Incorrect syntax near the keyword into

Error Message:


Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword ‘INTO’.

This error occurs when the syntax of the select into statement is not correct.

Example:
[sql]
SELECT * FROM
Product INTO ProductBackup
[/sql]

When the above code is executed error message 156 would occur.

Fix/Resolution:

– Check the SELECT INTO syntax.
– Make sure that the INTO Statement is after the column list( or *) and before FROM.

Fixed Code:
[sql]
SELECT * INTO ProductBackup
FROM Product
[/sql]