找到今天 或 的客户
如何在 SQL
中连接此查询table
Customer- cno,fname,lname ,address
oder-oder_no,cno,oderdate
oderline-oder_no,product,Qty,cost
答案 0 :(得分:1)
这是您要求的查询
select * from customer where cno in (select cno from oder where (orderdate=getdate() or orderdate = getdate()-1))
答案 1 :(得分:0)
从客户c中选择* 在o.cno = c.cno上加入oder o 在ol.oder_no = o.oder_no上加入oderline ol 其中oderdate> = getdate() - 1