MySQL獲取當(dāng)前時(shí)間與表中時(shí)間數(shù)據(jù)進(jìn)行比較 怎么寫?String?s="SELECT?MONTH(NOW())";
???????//SELECT?MONTH(NOW())
????????ResultSet?rs=st.executeQuery(s);
????????String?str="select?snum?,?baoyangtime?from?baoyang?wherer?MONTH(date)>?rs?";
????????ResultSet?rt=st.executeQuery(str);我表中有個(gè)DATE類型的數(shù)據(jù),我想先獲取系統(tǒng)當(dāng)前日期月份,然后與表中時(shí)間月份進(jìn)行比較 ,實(shí)在不知道怎么寫了,能幫幫執(zhí)教。 ?
MySQL獲取當(dāng)前時(shí)間與表中時(shí)間數(shù)據(jù)進(jìn)行比較 怎么寫?
UDUN
2016-06-20 14:20:37