Bring a before any other field in the SELECT

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
  

Poston Fri, 05 Jan 2018 9:59 am

Guys, I'm starting to mess with Plsql now and I'm with a doubt.
I want to do a select to bring a field before everyone else, for example:
Code: Select all
select <Campo>, * from <Tabela>
is it possible to do this select somehow?
Thanks
castellan

Poston Fri, 05 Jan 2018 11:35 am

Hello, an alias (nickname) for the table will help this need:
Code: Select all
select 'MEU CAMPO' as campo_novo, T.* from myTable T
DanielNN
Location: Fortaleza - CE

att,

Daniel N.N.



Return to PL/SQL

Who is online

Users browsing this forum: No registered users and 4 guests