开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜