mysql聚合函数

1、统计一下插入的数据总数

SELECT COUNT(giftCertificateId) AS number FROM gift_certificate WHERE giftCertificateNo LIKE 'boc%';
SELECT giftCertificateId, COUNT(gc.`giftCertificateId`) AS 总共 FROM gift_certificate gc WHERE giftCertificateNo LIKE '%boc%';

posted @ 2014-10-20 12:02  kin2321  阅读(185)  评论(0编辑  收藏  举报