May 8, 2008 at 11:55 am
Hi,
I need to be able to delete all the data from 10 different tables and then import a cvs file to update data. Using "truncate" i get error
Cannot truncate table 'tblname' because it is being referenced by a FOREIGN KEY constraint
how do i go around this? Thanks!
May 8, 2008 at 12:05 pm
You could simply go
Delete from Mytable
It doesn't have the same limitations as TRUNCATE TABLE, although you will have to empty the tables in the "right order" (delete the rows from Children table first, then the Parent tables).
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy