By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,413 Members | 1,594 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,413 IT Pros & Developers. It's quick & easy.

SQL Data Manipulation

P: 13
I am new i SQL and i want to update,insert and delete using multiple related tables for instance

Table 1 and Table 2 - When i update table one also the related field in table 2 must be updated ...


Thanks
Oct 31 '08 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
Lots of ways:

1. Issue two statements.

or

2. Create an updateable view.

or

3. Use ON UPDATE CASCADE

It all depends on your requirement. Is this a one time thing? Why don't you post some sample data and your requirement.

-- CK
Oct 31 '08 #2

P: 13
That is what i code

INSERT C.CustName,O.OrderDate
INTO Customer C , Order O
WHERE O.OrderNo=C.OrderNo
VALUES ('Lee','20/11/2008')

Correct me because i haven't test as my SQL Server is not working at moment.
Oct 31 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.