Sql-Server Select Statement Behaviour.

Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 1019
Hello All,

Today i will tell you about the behavior of Sql-Server Select Statement.

If we execute a below statement,then it will throw an error:-
Select xyz;

Msg 207, Level 16, State 1, Line 1
Invalid column name 'xyz'.

But if we execute below statement,then it will execute successfully,and will give us valid result.
 Select 1;

Output will be:-

Let's take another example:-
Suppose,if i write below query:-
Select 111abc;
Select 111 abc.

Output will be:-


Here,ABC will be treated as your column-name and 111 will be treated as Row.

Comments or Responses

Login to post response