该怎么写代码来判断?

FlyingQQ 2002-03-28 06:44:34
我要判断某个字段是否为空,该怎么写代码?
...全文
36 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
King_Dragon 2002-03-28
  • 打赏
  • 举报
回复
摘自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.
intothe_rain 2002-03-28
  • 打赏
  • 举报
回复
同意
intothe_rain 2002-03-28
  • 打赏
  • 举报
回复
Field.IsNull: Boolean
NetLoLo 2002-03-28
  • 打赏
  • 举报
回复
if query.fieldbyname('field').IsNull then...else...
FlyingQQ 2002-03-28
  • 打赏
  • 举报
回复
详细点!可以吗?
tianjin 2002-03-28
  • 打赏
  • 举报
回复
SELECT *
FROM TableName WHERE Field IS NULL
prometheusphinx 2002-03-28
  • 打赏
  • 举报
回复
TField.IsNull
tianjin 2002-03-28
  • 打赏
  • 举报
回复
Field.IsNull: Boolean
FlyingQQ 2002-03-28
  • 打赏
  • 举报
回复
数据库为SQL SERVER 2000,用adotable连接。

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧