0

Is there a way to add specific custom columns/messages before the columns selected using * columns? This works fine.

select * , 'User_Msg_1' from rrc;

whereas i need something like this

select 'User_Msg_1', * from rrc;

Siva
  • 294
  • 1
  • 9
  • 25
  • You really shouldn't be using `*`, and certainly shouldn't be relying on the order of columns in the resultset. – eggyal Jan 08 '14 at 17:21
  • 1
    You really shouldn't be using "shouldn't" without providing [reference](http://stackoverflow.com/q/65512/1346207). – Markus Malkusch Jan 08 '14 at 17:42

1 Answers1

1

Use rrc.*:

SELECT 'User_Msg_1', rrc.* FROM rrc;

or make a cartesian product on the relation {("User_Msg_1")}:

SELECT * FROM (SELECT 'User_Msg_1' FROM DUAL), rrc
Markus Malkusch
  • 7,738
  • 2
  • 38
  • 67