select unix_timestamp(now()) - (select unix_timestamp(ts)
from heartbeat order by id desc limit 1)
"@@"也不支持
SELECT @@session.autocommit
DELETE
删除多表
delete table1,table2
SET
SET NAMES utf8
SHOW
SHOW COLLATION
COMMIT
commit
其他关键字
EXTRACT
SELECT
IFNULL((SELECT SUM(clicks_nb) FROM ajk_proclicklog_monthly
WHERE period = a.last_month AND brokerid = 1077555), 0)
AS PmontClick,
IFNULL((SELECT SUM(clicks_nb) FROM ajk_proclicklog_monthly
WHERE period = a.this_month AND brokerid = 1077555), 0)
AS MonthClick,
IFNULL((SELECT SUM(clicks_nb) FROM ajk_proclicklog_daily
WHERE period = a.yesterday AND brokerid = 1077555), 0)
AS YesteClick,
IFNULL((SELECT SUM(clicks_nb) FROM ajk_proclicklog_daily
WHERE period = a.today AND brokerid = 1077555), 0)
AS TodayClick
FROM
(SELECT
EXTRACT(YEAR_MONTH FROM DATE_SUB(CURDATE(),
INTERVAL 1 MONTH)) AS last_month,
EXTRACT(YEAR_MONTH FROM CURDATE())
AS this_month,
EXTRACT(YEAR_MONTH FROM
DATE_SUB (CURDATE(), INTERVAL 1 DAY)) * 100 +
extract(DAY FROM DATE_SUB(CURDATE(), INTERVAL 1 DAY))
AS yesterday,
EXTRACT(YEAR_MONTH FROM CURDATE()) * 100
+ extract(DAY FROM CURDATE()) AS today
) a
ON DUPLICATE
insert into list_acenter_hetong_c (contractId,httype,sub_amount)
values ('E03KM1303120001','6','0.70')
ON DUPLICATE KEY UPDATE
contractId='E03KM1303120001',
httype='6',sub_amount=sub_amount+0.70
#v2:CoSB_vc@CoSB_vc.php (490) stats_db 1368285213
SELECT
DELETE
SET
SHOW
COMMIT
其他关键字
MORE