Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
12 lines (11 sloc) 174 Bytes
create or replace function fun(a float, b float)
returns float
language sql
as '
SELECT COALESCE(b, a)
';
select a,b,t,v,
fun(t,v) as v_or_t
from tbl
order by a,b,t
;
You can’t perform that action at this time.