Friday, October 22, 2010

How do I change my table in sql database after creating it?

I created a table called STUDENT and set the primary key as: studentID and 2 foreign keys: staffID and courseNo.



I need to drop my table but my 'drop table' statement doesnt work, and even when I use the Alter Table command. What should I do now?How do I change my table in sql database after creating it?
You need drop foreign key in another table/tables, which references to STUDENT table.How do I change my table in sql database after creating it?
You will need to ';break'; the relationship betwen the tables (remove the foreign keys) so the table stands on its own. Then delete it or amend it then recreate the relation

No comments:

Post a Comment