0

How to cope data from table-1 to table-2

getting data of table-1 and copy on table-2

28th Jan 2017, 6:34 AM
ahmed
3 odpowiedzi
+ 1
okay , Thank you very much
28th Jan 2017, 8:01 AM
ahmed
0
select from table 1, insert into table 2, remember to specify columns and rows. e.g. INSERT INTO table2 (fieldnames) SELECT fieldnames FROM table1
28th Jan 2017, 7:59 AM
Andre van Rensburg
Andre van Rensburg - avatar
0
If both tables are truly the same schema: INSERT INTO newTable SELECT * FROM oldTable Otherwise, you'll have to specify the column names (the column list for newTable is optional if you are specifying a value for all columns and selecting columns in the same order as newTable's schema): INSERT INTO newTable (col1, col2, col3) SELECT column1, column2, column3 FROM oldTable
3rd Feb 2017, 1:09 PM
Akwin Lopez
Akwin Lopez - avatar