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?)
Remove the "FROM AS" and it should work. See http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-select-into-table.html
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.