01 2009 档案

摘要:select a/b from table以上语句当中,如果b的值非零,那么,运行会正常。如果b的值是零。那么运行时就会报错:“被零除错误”。通过修改成以下可解决此问题!select a/(case when b=0 then 1 elseb end) from table 阅读全文
posted @ 2009-01-13 21:58 missthe 阅读(8329) 评论(1) 推荐(0)
摘要:1、将完全相同字段的两表数据合并: select into 新表 from 合并A表 union all select * from 合并B表2、替换某字段内的某些特定字符 update 表名 set 字段名=replace(convert(varchar(8000),字段名),'要替换的','替换为的') 阅读全文
posted @ 2009-01-06 18:33 missthe 阅读(234) 评论(0) 推荐(0)