现有订单表orders,包含数据如下表。若查询既订购了产品P01,又订购了产品P02的顾客编号,可以执行以下哪两个sql语句?()cid(顾客编号)Pid(产品编号)C01 P01C01 P02C02 P01C03 P02

A.selectdistinct(cid)fromorderso1whereo1.pidin('p01','p02') B.selectdistinct(cid)fromorderso1,orderso2whereo1.pid='p01'ando2.pid='p02'ando1.cid=o2.cid C.selectdistinct(cid)fromorderso1wherepid='p01'andcidin(selectcidfromorderswherepid='p02') D.electdistinct(cid)fromorderso1,orderso2whereo1.pid='p01'ando2.pid='p02'

时间:2024-01-29 11:48:36

相似题目