Bug #41951 Error Code : 1064 when use 'select ... into...' statement
Submitted: 8 Jan 2009 9:28 Modified: 8 Jan 2009 10:18
Reporter: Ivy Liang Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:4.1 OS:Windows
Assigned to: CPU Architecture:Any

[8 Jan 2009 9:28] Ivy Liang
Description:
SELECT * INTO product FROM products;

Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'product FROM products' at line 1
(0 ms taken)

How to repeat:

both tables have the same structure, table product is empty and products has one hundred or so rows. when execute this command, it gives error.
[8 Jan 2009 10:18] Valeriy Kravchuk
This is NOT a bug. Please, read the manual, http://dev.mysql.com/doc/refman/4.1/en/ansi-diff-select-into-table.html. Use

insert into ... select * from ...

instead.