Try these four SQL commands (I use MS SQL Server Management Studio 2012, connecting to SQLServer 2012 11.0):
select 'hello' from anytable
(select 'hello' from anytable)
select 'hello' from anytable order by 1
(select 'hello' from anytable order by 1)
The first three work just fine. The fourth gives an error:
Msg 156, Level 15, State 1, Line 1 Invalid syntax next to the keyword 'Order'.
Any ideas what is going on?
source
share