Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

INSERT OVER statement?

What the difference between

INSERT INTO table VALUES (values)

and

INSERT OVER table VALUES (values)

?

like image 567
Alex Avatar asked Mar 28 '11 14:03

Alex


2 Answers

Of all reserved keywords, only INTO and OVER work.

SQL:2003 mentions OVERRIDING keyword to override the identity (currently only supported by DB2)

Probably, SQL Server parses it for now but does not actually implement.

The plans generated are identical, and ParameterizedText is expanded into INSERT INTO.

So as for 2008R2, the answer would be this:

No difference, except that INSERT OVER has already wasted about 50 manhours of most curious developers to the moment and there is more to go

like image 85
Quassnoi Avatar answered Oct 03 '22 07:10

Quassnoi


People at Microsoft say:

Thanks for reporting this issue. We keep recognizing the OVER keyword along with the INTO keyword (with the same meaning) in INSERT statements to provide backward compatibility with the previous versions of SQL Server. This should not present any problem for application development.

Eugene Zabokritski, SQL Engine

like image 22
GSerg Avatar answered Oct 03 '22 08:10

GSerg