Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how i insert record with a single querrey into two tables and one table have multivalued attributes.
Posted
Comments
CHill60 31-Mar-15 17:42pm    
Not clear what you mean. I can tell you that you can't update two tables in a single query - but you could have a stored procedure (called from a "single query") that would do it. What are you actually trying to do? Use the Improve question link to update your post
PIEBALDconsult 31-Mar-15 17:44pm    
Queries don't insert.
Member 11236459 2-Apr-15 16:10pm    
i did my previous question using trigger(for insert/after insert).. i have another query that what are benefits of (on update cascade) applying on foreign key?and also told me that how to alter my foreign key constraint am already created tables without (on update cascade) and (on delete cascade)??

1 solution

BY using Alter command you can add or Remove constraints from the table, Here i added new Foreign Key Constraint simillarly you can drop your constraint.

ALTER TABLE TABLE NAME
ADD CONSTRAINT FK_NAME
FOREIGN KEY (COLUMN NAME) REFERENCES PRIMARYKEY_TABLE NAME(COLUMN NAME)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900