Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Update

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-01 : 07:57:39
sarath writes "Hello

i would like to update the records in two tables simulatanously. Like, i am able to select records into 2 tables using join. But, how should i do incase of update. I want to do it with only 2 tables.

Thanks in advance"

Nazim
A custom title

1408 Posts

Posted - 2002-07-01 : 08:25:07
You Cannot do it. Always remember any update, delete or insert can be done only on one table at a point. Select is very different from these DML commands. with Select you only retrieve the data. if you look close on the all DML commands. you will notice they require a source and that source can only be a single object. you can very well have views and write Code On Instead of Triggers and achieve the same.

-------------------------
What lies behind you and what lies ahead of you are small matters compared to what lies within you.-Ralph Waldo Emerson
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-07-01 : 08:53:04
You can simulate updating two tables at the same time by explicitly defining transactions.

<O>
Go to Top of Page
   

- Advertisement -