2019年5月28日

摘要: exists子查询 --一次性购买“手机数码”产品的数量超过三个的消费金额打8折 --根据已知项查询未知项 --【1】根据类别名称查询类别编号 select sortid from commoditysort where sortname='手机数码‘ --【2】根据类别编号查询商品编号 selec 阅读全文
posted @ 2019-05-28 16:29 给力MM 阅读(399) 评论(0) 推荐(0)
 
摘要: IN 后面的子查询可以返回多条记录 语法:select * from 表名 where 查询表达式 IN(子查询) --查询购买了“宝马小帅哥20寸”的用户信息 【1】根据商品名称查询商品编号 select commodityid from commodityinfo where commodity 阅读全文
posted @ 2019-05-28 09:23 给力MM 阅读(264) 评论(0) 推荐(0)