In Oracle sql,I want to select few columns values from a table. If no row exists, i want to select default values for each columns. I need something like below
if exists (select 1 from mytable where key ='11')
then
select key, value, comment from mytable where key ='11'
else
select 'key1' as "key", 'value1' as "value", 'default' as "comment"
What is the best way to do this in oracle.