I'm getting an error in deleting a record from Customers table (or other tables such as Categories) in Northwind database of SQL Server, due to foreign key constraint. How can I solve it? Thanks a lot!
It sounds like there is a row in another table that needs the row your trying to delete. You could try deleting the referencing row(s) first then delete the record from the customers table.
It would help to see the table structure to be sure though.
__________________ eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."
I'm just testing with the classic Northwind db in SQL Server. Seems I need to study the whole db and check the related tables for deletion.
I wanted to know if there's an easier way.
I am unfamiliar with this Northwind db and I have never use SQL Server (even though I have it on CD somewhere...).
I know that you can find the reationships with MySQL with this: SHOW TABLE STATUS FROM your_db_name [like 'tabe_name'];
I don't know what the SQL Server command is for the same thing. I noticed MySQL does things a little differently from my time using Oracle.
__________________ eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."