Incorrect syntax near the keyword into

Posted on : 18-05-2012 | By : Devi Prasad | In : Msg 156, SQL Errors

0

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:

SELECT * FROM
Product INTO ProductBackup

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:

SELECT * INTO ProductBackup
FROM Product

Tags: