输出值数据库中有个字段值是-1,我想输出时,改为0,可以吗[解决办法]select case 字段名 when 1 then 0 else
输出值
数据库中有个字段值是-1,我想输出时,改为0,可以吗
[解决办法]
select case 字段名 when 1 then 0 else 字段名 end from 表名
[解决办法]
select (case field1 when -1 then 0 else field1 end) as field1
from table
输出值
数据库中有个字段值是-1,我想输出时,改为0,可以吗
[解决办法]
select case 字段名 when 1 then 0 else 字段名 end from 表名
[解决办法]
select (case field1 when -1 then 0 else field1 end) as field1
from table