467,915 Members | 1,352 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

SQL Data Manipulation

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
  • viewed: 1067
Share:
2 Replies
ck9663
Expert 2GB
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
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.

Similar topics

1 post views Thread by Ferran Foz | last post: by
1 post views Thread by Oded | last post: by
2 posts views Thread by ajay | last post: by
3 posts views Thread by Ben R. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.