Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

column alias: how to rename columns in a select statement?

AndrewGoodnightAug 16 2011 — edited Aug 17 2011
hi,
is there a handy way to rename all columns from a table by adding a prefix, say 'n_' , in a select statement.
if there are just few columns, i can do it this way
select a.col1 n_col1,
a.col2 n_col2,
a.col3 n_col3
from table1 a

while, if there are hundreds of columns, it will drive me crazy to list all the columns.
can i use select * while aliasing columns?

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2011
Added on Aug 16 2011
5 comments
3,574 views