October 29, 2012 at 6:39 am
kapil_kk (10/25/2012)
One question, I am confused on this...select ID, name name from person
select ID ID, name name from person
Both these statements dont give any error message and run successfully...
wht is it so?
Hi kapil,
1st statement :-
it's showing that you are giving the alias column name to column 2(name). I can also right this like:-
select ID, name as [name] from person
or
select ID, name as [Column_2] from person
2nd Statement :-same thing happen in 2nd statement.
Check below statement. have fun
select '--------------------' as TT
select 233 as '____________'
Thanks
Vinay
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
October 29, 2012 at 2:15 pm
Good Exercise for Basic of SQL.
Nice One
Thanks:-)
October 29, 2012 at 2:50 pm
Easy question.
It shows once again, the more options/possibilities, the more errors can be made.
November 3, 2012 at 1:36 am
Thanks Danny 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Viewing 4 posts - 31 through 33 (of 33 total)
You must be logged in to reply to this topic. Login to reply