该怎么写代码来判断?
我要判断某个字段是否为空,该怎么写代码? 问题点数:20、回复次数:9Top
1 楼FlyingQQ(FlyingQQ)回复于 2002-03-28 18:46:00 得分 0
数据库为SQL SERVER 2000,用adotable连接。Top
2 楼tianjin(tianjin)回复于 2002-03-28 18:46:11 得分 2
Field.IsNull: BooleanTop
3 楼prometheusphinx(白日梦)回复于 2002-03-28 18:46:24 得分 2
TField.IsNullTop
4 楼tianjin(tianjin)回复于 2002-03-28 18:47:11 得分 2
SELECT *
FROM TableName WHERE Field IS NULLTop
5 楼FlyingQQ(FlyingQQ)回复于 2002-03-28 18:49:55 得分 0
详细点!可以吗?Top
6 楼NetLoLo(罗洛)回复于 2002-03-28 18:56:20 得分 6
if query.fieldbyname('field').IsNull then...else...Top
7 楼intothe_rain(在雨中)回复于 2002-03-28 18:57:17 得分 2
Field.IsNull: BooleanTop
8 楼intothe_rain(在雨中)回复于 2002-03-28 18:59:01 得分 0
同意Top
9 楼King_Dragon(代码虫子)回复于 2002-03-28 19:20:25 得分 6
摘自delphi5bde local sql help:
Indicates whether a column contains a NULL value.
column_reference IS [NOT] NULL
Description
Use the IS NULL comparison predicate to filter a table based on the specified column containing a NULL (empty) value.
SELECT *
FROM Customer
WHERE (InvoiceDate IS NULL)
Use NOT to return the converse of a IS NULL comparison.
Note For a numeric column, a zero value is not the same as a NULL value.Top




