Incorrect syntax near the keyword into

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

Share:

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
(Visited 858 times, 1 visits today)



References : Devi Prasad (sqlserverlearner.com)

Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.


Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.




Write a comment



Tags: