• 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?

    'coz they are syntactically correct. They follow the belew rule

    SELECT <column_name> [optional "AS" keyword] [optional <alias_name>]

    FROM <table_name>

    Alias_name can be same as that of column_name. Hope it is clear now

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter