Your problem has something to do with referential integrity. You cannot delete a record (from the tbl_Customer table) that is currently referenced by some records in a specific table (for example, table_Project ). UPDATE is different from DELETE if you do not update the key, in your case CustomerID . UPDATE changes the record, and DELETE deletes the record.
Take a look at this example,
Tbl_Customer table
CustomerID CustomerName 1 Hello 2 World
table_Project table
CustomerID ProjectName 1 Webscripting 1 Database Maintenance
You can always do whatever you want on record 2 the tbl_Customer table, because there is no record referencing it. But in record 1 you cannot delete it if two records from table_Project not deleted. You can change the CustomerName column, but not the CustomerID , if still referenced.
source share