Tuesday, January 10, 2012

Insert into table Fix value With Filter Values

This code show you how to insert into table fix value with filter values

SQL Code

INSERT INTO Table1
                      (Col1, Col2)
SELECT     59, Col2
FROM         Table2
WHERE     (Col1 = '56')


Code Description
Table name call Table1 & Table2 with column name Col1,Col2 . This code Insert Fix value 59 into Col1 and Col2 value in Table2 into  Table1

No comments:

Post a Comment