How to insert datas from a table to another table?
USER and USER_1
I want to insert datas from USER_1 to USER.开发者_如何学C
How to do it ?
I try to do it, but without success :
INSERT INTO USER WHERE id IN (SELECT * FROM USER_1)
As long as you are sure the schemas are the same...
Use:
INSERT INTO USER
SELECT * FROM USER_1
This is the Syntax for SQL Server, not sure if it is identical in MySQL.
Maybe try this
INSERT INTO USER
(Here is your columns)
VALUES
(SELECT * FROM USER_1)
精彩评论