执行空值记录 [英] executing null values records

查看:44
本文介绍了执行空值记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行表中具有 TotalTime null 值的记录 NewTimeAttendance...TotalTime 数据类型 nchar(10)

i am trying to execute the records that have TotalTime null value from the table NewTimeAttendance...TotalTime datatype nchar(10)

select * from newtimeattendance where TotalTime =  'NULL'

....什么都没有

select * from newtimeattendance where TotalTime =  'null'

....什么都没有

select * from newtimeattendance where TotalTime =  'Null'

....什么都没有

select * from newtimeattendance where TotalTime =  null

....什么都没有

select * from newtimeattendance where TotalTime =  Null

....什么都没有

select * from newtimeattendance where TotalTime =  NULL

....什么都没有

当我选择整个表时,我可以看到有一些 NULL TotalTime 值..!!

when i select the whole table i can see that there is some NULL TotalTime values..!!

这是一个小的选择语句..为什么它不起作用?有没有办法(特殊方式)用 nchar 类型执行NULL"?!

it is small select statment ..why doesn't it work ? is there a way (special way ) to execute the 'NULL' with nchar type ?!

提前致谢

推荐答案

你需要使用IS NULL

select * from newtimeattendance where TotalTime IS NULL

MySQL 文档有一些关于处理 NULL 值的好信息:http://dev.mysql.com/doc/refman/5.0/en/working-with-null.html

The MySQL doc has some good information on dealing with NULL values: http://dev.mysql.com/doc/refman/5.0/en/working-with-null.html

这篇关于执行空值记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆