sql server - Copy One Column value of one table into column of another table -
i have product table , location table in sql server 2008. want insert productid of product table productid column of location table using sql script. , insert other columns value of location table static,but productid column value want insert product table using sql script.
please me?
without knowing table structure, , assuming field1 varchar , field2 int can this:
insert locationtable (productid, field1, field2) select productid, 'field1', 10 producttable ....
Comments
Post a Comment