
SQL用语句查找null
在表Borrowbook中查找字段returndate里的null值,格式为Bookidbooknamereturndate3099XXXXnull...
在表Borrowbook中查找字段returndate里的null值,格式为
Bookid bookname returndate
3099 XXXX null 展开
Bookid bookname returndate
3099 XXXX null 展开
4个回答
展开全部
select * from borrowbook where returndate is null
------------------补充------------
select b.bookid,b.bookname,a.returndate
from borrowbook as a,book as b
where a.Bookid =b.Bookid
and a.returndate is null
展开全部
同意2L的说法
查询字段为null的时候,判断条件为where 字段名 is null
查询字段为空的时候,判断条件为 where 字段名=""
查询字段为null的时候,判断条件为where 字段名 is null
查询字段为空的时候,判断条件为 where 字段名=""
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
" select * from boorrowbook where returndate is null "没错,不过还要看从表Borrowbook中提取哪些字段值,如果只提取Bookid bookname returndate,就要把*改为字段名,如:
select Bookid,bookname,returndate from boorrowbook where r eturndate is null
select Bookid,bookname,returndate from boorrowbook where r eturndate is null
追问
抱歉题目上忘了写,bookname在book表里,怎样嵌套进去?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询