sql – Select with specific column – Oracle

Question:

I've been migrating to Oracle and found a question.

In SQL Server I could do it like this:

select coluna, * from tabela

How can I get a similar result using Oracle 12c?

Answer:

Oracle SQL does not directly allow the use of * with another column, it is necessary to use an alias for the table in this case, as shown below:

select tbl.coluna, tbl.* from tabela tbl
Scroll to Top
AllEscort