Quote:
Originally Posted by lse123
Is any error with this query
|
yes, is any error
first, remove the parentheses around the SELECT
second, replace the dreaded, evil "select star" (SELECT * ) with a list of all the columns except the auto_increment
then add the list of all columns except the auto_increment in parentheses in front of the SELECT
INSERT INTO foo ( col2, col3, col4 )
SELECT col2, col3, col4 FROM foo WHERE ...