5
Reply

How to make a query which use column and table aliases but not using joins

Syed Arbab Ahmed

Syed Arbab Ahmed

Oct 26 2010 4:03 AM
7.1k

How to make a query which use column and table aliases but not using joins

Select channel_id AS "ClAlias" from tblchannel TbAlias where tblaias.IS_DEFAULT = 1;

Giving error of invalid identifier, how can I make such a query which uses both table and column aliases but not related to joins.

My separate table alias and column aliases queries are working fine:

                                                             (Table alias query)

SELECT CHANNEL_ID, IS_DEFAULT from tblchannel ImTbAlias WHERE ImTbAlias.IS_DEFAULT = 1;

                                                            (Column alias query)

Select channel_id "ImClAlias" from tblchannel;

Thanks in advance.


Answers (5)