Using a column alias in nested select statements

You can use an column alias in the select list of nested select statements. The column alias uses one of these forms:

For example, this example is equivalent to a select statement with the as tableid clause removed:

1> select *
2> from syscolumns c
3> where c.id in (
4> select o.id as tableid
5> from sysobjects o
6> where o.name like '%attr%')

Adaptive Server ignores the alias (the allowed column heading) in this example.