礼品卡导入可用

INSERT INTO gift_certificate (giftCertificateNo,purchaser,recipient,isSentByEmail,giftCertAmt,remainedAmt,giftType,STATUS,VERSION,m1Amt,m2Amt,m3Amt,m4Amt,m5Amt,m6Amt,m7Amt,m8Amt,m9Amt,m10Amt,m11Amt,m12Amt,customerId,registerTime)VALUES('16940084','N/A','N/A',1,500,500,1,1,0,30,0,0,0,0,0,0,0,0,0,0,0,-2,'2014-10-09 14:00:00');
INSERT INTO gift_certificate (giftCertificateNo,purchaser,recipient,isSentByEmail,giftCertAmt,remainedAmt,giftType,STATUS,VERSION,m1Amt,m2Amt,m3Amt,m4Amt,m5Amt,m6Amt,m7Amt,m8Amt,m9Amt,m10Amt,m11Amt,m12Amt,customerId,registerTime)VALUES('ab74448351','N/A','N/A',1,500,500,1,1,0,30,0,0,0,0,0,0,0,0,0,0,0,-2,'2014-10-09 14:00:00');

 

查询数据库

SELECT COUNT(giftCertificateId) AS num FROM gift_certificate WHERE giftCertificateId >= 22116 ;

 

INSERT INTO coupon(promoRuleId,couponNo,isSent,remainedTimes,STATUS,VERSION)VALUES(38,'yhq510528967',0,1,1,0);

 

更新某个字段

UPDATE coupon SET promoRuleId=79 WHERE couponNo='yhq511220091';

 

统计

SELECT COUNT(*) AS 总共 FROM gift_certificate WHERE giftCertificateNo LIKE '%abchina%'

posted @ 2014-10-21 17:07  kin2321  阅读(236)  评论(0编辑  收藏  举报