Search code examples
sqloracleoracle-sqldeveloper

Expand * in select sqloracle


Is there a way/shortcut we could use to replace * with all the column names in table while using select * from table as t1
For eg., * would be automatically replaced into select t1.column1,t2.column2,.....,(etc.) from table as t1

Thanks for the help!


Solution

  • First, it is unlikely that the table named "table" exists in your schema. Second, the AS alias syntax is wrong in oracle dialect. Here is screenshot how it works:

    Here is how it works