locked
Technology ; SQLServer 2000 RRS feed

  • Question

  •  

    Is it possible to update multiple tables in one sql query ???

     

    e.g. update table_1,table_2 set table_1.col1='val1' , table_1.col2='val2'

     

    the above statement is wrong .....

     

    But if there is any way  to update multiple tables in one sql query tell me.....

    Friday, May 30, 2008 8:52 AM

All replies

  • As far as I know, there is no straightforward way as in mySQL, etc to update multiple tables. The only way I know is to use a stored procedure to wrap your update statements and just call the procedure once to complete all your updates in a single transaction.

     

     

     

    Saturday, May 31, 2008 6:22 PM