Sunday, February 2, 2014

Table update


use [MAIN]
INSERT INTO [Employee_details_Master](col1, col2) VALUES ('col1 value', 'col2 value') WHERE name='name'
GO
use [Demo]
INSERT INTO [Employee_details](col1, col2) VALUES ('col1 value', 'col2 value') WHERE name='name'

The "use" statement means you're going to use this database for the next sql statements


the "GO" is a batch separator, the sql statements will be executed concurrently, that means the first one will insert in MAIN and then the second one will insert in Demo.


Not sure if the "GO" is a must





No comments:

Post a Comment