Alias or view?



IBM's flagship relational database management system

Alias or view?

Postby romeshijamba » Sat Jan 26, 2008 12:15 am

select A.salary,name from ( select distinct salary from employee) A
where some condition

I am having a doubt in this query. it is that what will this "A" be?
will it be a view or an alias. and can i be able to select the name from A?
anyone please help me out.
romeshijamba
 
Posts: 1
Joined: Sat Dec 15, 2007 10:36 am
Has thanked: 0 time
Been thanked: 0 time

Re: alias or view?

Postby dick scherrer » Sat Jan 26, 2008 12:33 am

Hello,

What happened when you tried to run this?

I believe that "A" is neither a view nor an alias (at least not the db2 entities of those names).

This convention is most often when there are multiple tables and someone dles not want to repeat the "long" table name as a qualifier.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post