March 1, 2004

Dropping a primary and forign Key

Posted at March 1, 2004 4:03 PM in .

Every fault made when designing a Database through SQL gets recovered in many cases, but when the field is assigned as primary kay I wonder that Alter Table thetable drop thefield will make your DBMS cry 'Yoh man that's a primary key go play with foggs !' the best practice in such is that the primary key is a filed that have a constraint dropping the constraint wil make you DBMS obey you as a master : 'ALTER TABLE thetable DROP CONSTRAINT thekey'. In most DBMS this woks fine and about yours, I have doubts, just try and never get tired !

Trackback

You can ping this entry by using http://phpmagazine.net/cgi-bin/pub/mt-tb.cgi/3977 .

Ads

Comments

it is making me think twice about it

Posted by cute twinks at April 10, 2005 6:27 AM

Post a comment











Please enter the security code you see here
Remember personal info?