执行如下sql:
select value from table where id=1
查询出来的值可能大于0也可能小于0。我现在想把小于0的结果全都改成0输入。这个用decode函数怎么做的?
好像是select decode(value...?) from table where id=1
select case when value<=0 then 0 else value end from table where id=1
那如果在一个查询语句中同时查询两个安段的情况应该怎么写呢?
比如:
select a,b from table,对b进行判断