简体   繁体   中英

insert into table as select * from table does not work

This SQL statement is used in PHP:

Insert into Table from AS Select * from Tabl1 where id='5'

Any clues to why it is not inserting values from Table1 to Table? User executes this statement to create a copy.

Remove from as :

Insert into Table (Select * from Tabl1 where id='5')

(and BTW why '5' and not just 5 ? Is id actually a string value?)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM