rwwd Posted October 3, 2005 Share Posted October 3, 2005 Hello all. Silly question i know, but i want to move data from one table field to another, is this possible and if so what is the syntax?? I imagine it would be along the lines of - MOVE values one FROM colum_1 to colum_2 LIMIT 1, so in theory i have moved one from colum_1 one to colum_2. I hope that im in the right ballpark!! Cheers for the continued help. Rwwd Quote Link to comment Share on other sites More sharing options...
effigy Posted October 3, 2005 Share Posted October 3, 2005 something like this, i think; check the manual: [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--]inset into table1 values [span style=\'color:blue;font-weight:bold\']select[/span] * from table2 [!--sql2--][/div][!--sql3--] Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted October 4, 2005 Share Posted October 4, 2005 Insert all of table2 to table1 [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']INSERT[/span] INTO table1 [span style=\'color:blue;font-weight:bold\']SELECT[/span] * FROM table2 [!--sql2--][/div][!--sql3--] Insert from table2 to table2 with conditions [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']INSERT[/span] INTO table1 [span style=\'color:blue;font-weight:bold\']SELECT[/span] * FROM table2 WHERE blah blah [!--sql2--][/div][!--sql3--] Insert only certain fields from table2 to table1 [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']INSERT[/span] INTO table1 (field1, field3) [span style=\'color:blue;font-weight:bold\']SELECt[/span] field1, field3 FROM table2 [!--sql2--][/div][!--sql3--] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.