ON DELETE CASCADE CLAUSE

It is used  on Foreign keys when we are assigning the  Foreign Key on a particular column.

---It  automatically deletes the values from the Foreign key Column if the primary

--key value is deleted.

Example:-if 100 is there in Primary Key Column and  also there in the Foreign

--key Column , then if 100 is deleted on Primary key Column then 100 is automatically

deleted from Foreign key Column.

create table casdedemo
(sno int constraint pkm primary key,
sname varchar(10))



create table cascdata
(sno int  constraint fk foreign key references casdedemo(sno) on delete cascade,

sales int)
ON DELETE CASCADE CLAUSE Reviewed by Rupesh on 12:59 Rating: 5

No comments:

All Rights Reserved by Technology from Developers Eye © 2014 - 2015
Powered By Blogger, Designed by Aadics
Disclaimers:: The information provided within this blogsite is for general informational purposes only. While we try to keep the information up-to-date and correct, there are no representations or warranties, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information, products, services, or related graphics contained in this blogsite for any purpose.The author does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause.

Contact Form

Name

Email *

Message *

Powered by Blogger.