mhr123 Posted May 3, 2009 Posted May 3, 2009 Yar can any1 help me out, just doing some SQL R and D ... 1) if i need to copy one complete row (its PK) to another row in the same table what command should i use . 2) If I need to copy all the rows from one Database to another all both the tables have identical rows , what is the command. Highly appreciate ur help... :two_thumbs_up:
fineleg Posted May 3, 2009 Posted May 3, 2009 For 1 - do you want to create a new row with the same values (except different PK value)? 2. SELECT * INTO Table_2 IN Database2 FROM Table1 or depending on the software you are using, SELECT * INTO server2.Database2.Table_2 FROM server1.Database1.Table1
flamy Posted May 4, 2009 Posted May 4, 2009 For 1 - do you want to create a new row with the same values (except different PK value)? 2. SELECT * INTO Table_2 IN Database2 FROM Table1 or depending on the software you are using, SELECT * INTO server2.Database2.Table_2 FROM server1.Database1.Table1
mhr123 Posted May 4, 2009 Author Posted May 4, 2009 For 1 - do you want to create a new row with the same values (except different PK value)? 2. SELECT * INTO Table_2 IN Database2 FROM Table1 or depending on the software you are using, SELECT * INTO server2.Database2.Table_2 FROM server1.Database1.Table1 yah a new row has already been inserted , need to copy the values idential to 1st row which is also a PK
Recommended Posts