Table Aliasname

  • Hello All,

    In the below query, iam giving the alias name for the table1 as 'a' and we already have a table with the same name 'a' in the database.Please let me know whether the condition a.column1 will fetch the records from table1.

    select * from table1 a,table1 b

    where a.column1=b.column1

    Your help will be appreciated.

  • It will give rows from both aliases (try it and see).

    To just get those from one copy

    select a.* from table1 a,table1 b

    where a.column1=b.column1

    Bit of an odd query though.


    Cursors never.
    DTS - only when needed and never to control.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply