sql imp topics

1

Click here to load reader

Upload: madhuhl15

Post on 08-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SQL Imp Topics

7/17/2019 SQL Imp Topics

http://slidepdf.com/reader/full/sql-imp-topics 1/1

Sql Imp Topics

• ON DELETE CASCADE:A Foreign Key constraint is a referential integrityconstraint. In other words, when you want to delete a row from a parent table and

that row has associated child rows in another table then you rst need to delete allassociated rows from the child table that has a relationship with the parent tablethen delete the parent table row. To avoid this situation, you can use the O !"#"T"$A%$A!" option, when you delete a row in the parent table, the database serveralso deletes any rows associated with that row &foreign 'eys( in a child table. Theprincipal advantage to the cascading)deletes feature is that it allows you to reducethe *uantity of %+# statements you need to perform delete actions for.