问题描述
- sql查数据除以100怎么做啊啊~~~
-
String queryString = "SELECT c.couponname, c.couponfee, c.pic1_path,date_format(c.endtime,'%Y-%c-%d') as endTimeFROM couponpublish c,couponpool s WHERE s.pubid=c.pubid AND s.owner='"+userId+"' ";
怎么把sql查到的couponfee除以100显示??
解决方案
SELECT c.couponname, c.couponfee/100, c.pic1_path,date_format(c.endtime,'%Y-%c-%d') as endTimeFROM couponpublish c,couponpool s WHERE s.pubid=c.pubid AND s.owner='"+userId+"' ";
你试试
解决方案二:
String queryString = "SELECT c.couponname, c.couponfee*0.01, c.pic1_path,date_format(c.endtime,'%Y-%c-%d') as endTimeFROM couponpublish c,couponpool s WHERE s.pubid=c.pubid AND s.owner='"+userId+"' ";
时间: 2024-09-17 21:41:55