“单价”是一个money类型的字段,要查询单价为空的所有记
企业管理软件版1楼: “单价”是一个money类型的字段,要查询单价为空的所有记录,如何写SQL语句?我写的
select * from talble where convert(单价='''')不正确
select * from talble where convert(单价='''')不正确
2楼: Create view aView
as
(
select isnull(单价,''空''),* from talble
)
go
select * from aView where 单价=''空''
给分吧! 如会计
3楼: to chinapr
有没有不建视图的方法,直接写SQL语句?
4楼: select * from talble where 单价 is null
5楼: select * from talble where isnull(单价)
单价这类重要数据,还是在建库时设一个默认的0吧。
6楼: 多人接受答案了。