应该是:sql="select from data WHERE 日期 =#"&today&"# and 姓名 ='"& name &"' and 在线时间 =null"
你先试试看,我也不是很记得了
比如一个表有id和name字段
但是你只想往id字段里插入,但是你首先要保证name字段允许为空
1
insert
into
表名(id)
values
(1);
2
insert
into
表名
values
(1,null);
以上两种情况都可以插入,你试验一下
加入说你的datetime的列为birth,那试下下面的语句看下
insert
into
table(birth)
values(to_date('2008-08-08','yyyy-mm-dd'))
上面的符号都是英文状态下的,这里打不出
1、首先需要创建数据库表t_user_info,利用创建表SQL语句createtable。
2、向数据库表里插入数据,按照插入SQL语句insertinto执行。
3、插入完毕后,查询数据库表记录select字段fromtable。
4、查询数据库表t_user_info用户地址为空的记录selectfromtablefrom字段isnull。
5、查询数据库表t_user_info用户电话不为空的记录,selectfromtablewhere字段isnotnull。
6、查询数据库表t_user_info电话不为空且地址为空的记录,selectfromtablewhere字段isnotnulland字段isnull。
update table set b=case when a='小红' then '100' when a='小兰' then '300' end
where a in('小红','小兰')
数据库中空字段分为 NULL '' 判断是否为NULL时用 IS NULL 判断是否为'' 用!='' 比如 select from table where value !=''; select from table where date IS NOT NULL;
以上就是关于asp中查询数据库,想选取某个字段为空的一条数据如何做到全部的内容,包括:asp中查询数据库,想选取某个字段为空的一条数据如何做到、如何使用SQL语句往数据库中添加一条空记录、数据库里的 DateTime类型的字段怎么插入空值等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)