I have a query like this:
select data_name into v_name from data_table where data_table.type = v_t_id
Normally, this query shou
select coalesce(data_table.data_name, d.data_name) data_name into v_name from (SELECT 'UNKNOWN ' as data_name FROM DUAL) d LEFT JOIN data_table ON data_table.type = v_t_id or a.data_table.data_name is null