ACCESS
Example:
Insert into Products (PRONUMBER,CASNUMBER,CNNAME,PRICE,ENNAME,BAOZHUANG,PINPAI) Select Pronumber,casnumber,cnname, Price,enname,baozhuang,pinpai from product22
1. Use one sentence of SQL to extract data from a table into another table. This is useful for data conversion between different programs, and it is fast and data is complete:
Insert INTO table1 (column1,column2,...) Select Column1,column2,... from table2
(where Table1 's fields correspond to table2, primarily data types, and the number of fields must be equal)
2. Use one sentence of SQL to extract the data from one table to update the corresponding value in the other table:
Update table1,table2 set table1.column1=table2.column1 where Table1.column2=table2.column2
As with the previous one, we have to correspond. You can also extend updates to the corresponding values between multiple tables.
3. Compare the values of a corresponding field in two tables:
SELECT * FROM table1 where ID not in (select ID from table2)
Update two tables with a single SQL statement and update the values of the corresponding fields