可以參考下列語句
創(chuàng)新互聯(lián)公司于2013年創(chuàng)立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站制作、網(wǎng)站設(shè)計(jì)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元珠山做網(wǎng)站,已為上家服務(wù),為珠山各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:028-86922220
select adddate(concat(年月字段,'-',日期字段),interval 1 day) from 表名;
select?
table_a.culumn1?as?a1,table_a.culumn2?as?a2,table_a.culumn3?as?a3,
table_b.culumn1?as?b1,table_b.culumn2?as?b2,table_b.culumn3?as?b3
from
(select?*?from?a)?as?table_a
full?join?(select?*?from?b)?as?table_b?on?table_a.time=table_b.time
你可以直接將這兩個(gè)查詢當(dāng)做子句分別替換到括號(hào)內(nèi)的內(nèi)容中,字段根據(jù)需要換掉即可。
本回答僅以實(shí)現(xiàn)需求為先,若要提高效率需要另找辦法了。
SELECT *,CONCAT(a1.Date," ",a1.Time) as w FROM a as a1 , b as b1 where CONCAT(a1.Date," ",a1.Time) CONCAT(b1.Date," ",b1.Time); 這樣么 應(yīng)該可以不用時(shí)間戳比較
試試下面這樣行不
concat("2015","-","05","-","07"," ","12",":","00",":","00")