Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
vegan
Starting Member
1 Post |
Posted - 2011-12-02 : 21:44:27
|
| IBM dbms wont let me run code keeps saying the table in use - its for my assignment. i need to run this code and then i have to test the foreign key constraint. how do i test it and what error msg it supposed to produce? heres the code im trying to run,ALTER TABLE SCHEMA20.CUSTOMERADD CONSTRAINT SCHEMA20.CUSTOMER_CC_FKFOREIGN KEY (COUNTRY_CODE)REFERENCES SCHEMA20.COUNTRY (COUNTRY_CODE); |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-03 : 00:16:13
|
| once you create the foreign key constraint, inserting any value in COUNTRY_CODE column of SCHEMA20.CUSTOMER which is not a valid value present in SCHEMA20.COUNTRY.COUNTRY_CODE table should throw a foreign key violation error if its created correctly.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|