X xiangsni Unregistered / Unconfirmed GUEST, unregistred user! 2005-11-01 #1 如何用SQL语句把数据库表中的负的字段值转换成0或整数(字段名称fsubsistence),
X xiangsni Unregistered / Unconfirmed GUEST, unregistred user! 2005-11-01 #2 如何用SQL语句把数据库表中的负的字段值转换成0或整数(字段名称fsubsistence),
K kid Unregistered / Unconfirmed GUEST, unregistred user! 2005-11-01 #3 update 表名 set fsubsistence=0 where fsubsitence<0
X xiangsni Unregistered / Unconfirmed GUEST, unregistred user! 2005-11-01 #4 不用update ,不好意思我没说清楚,我要在查找的过程中自动把负的字段植变掉。
K kk2000 Unregistered / Unconfirmed GUEST, unregistred user! 2005-11-01 #5 select case when fsubsistence > 0 then fsubsistence else 0 end fsubsistence from TableName
W wanshi131 Unregistered / Unconfirmed GUEST, unregistred user! 2005-11-01 #7 select fsubsistence=(case when fsubsistence > 0 then fsubsistence else 0 end) from TableName