sql server - Inserting some data from one table into another table -
i going populate intersection table value table (view), have 1 value static each insert.
my query looks this:
insert dbo.intersectiontable (col1, col2) select *col3*, col4 dbo.viewtable *col3* null
now, col3 field need switch out static value (eg. 11), how can both insert table , specify 1 static value?
my guess be
insert dbo.intersectiontable (col1, col2) values (11, (select col4 dbo.viewtable col3 null))
but me doesn't quite right.
you can try this...
insert dbo.intersectiontable (col1, col2) select 11, col4 dbo.viewtable col3 null
Comments
Post a Comment