标签:rom 错误 ber strong where img customer sel mat
1、
SELECT g.`name`,DISTINCT(s.goods_id) from shoppinglist s,goods g
WHERE s.goods_id=g.id
错误
正确是:
SELECT DISTINCT(s.goods_id),g.`name` from shoppinglist s,goods g
WHERE s.goods_id=g.id
2、
select c.`name`,g.`name`, FORMAT(s.number/g.unit_price , 2)from customer c,shoppinglist s,goods g
where c.id=s.customer_id and s.goods_id=g.id
3、
SELECT * from customer c where c.date>‘2012-11-1‘ order by c.id asc
4、
SELECT c.`name` from customer c,shoppinglist s where c.id=s.customer_id GROUP BY s.customer_id
HAVING sum(s.number)>=50
标签:rom 错误 ber strong where img customer sel mat
原文地址:http://www.cnblogs.com/angle-happy/p/6700700.html