Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说
mysql备注用什么数据类型_MySQL常用语句,希望能够帮助你!!!。
SELECT * FROM Session where createTime >= DATE_SUB(now(), INTERVAL 3 DAY); 或 SELECT * FROM Session where createTime >= now()-interval 3 day;
SELECT * FROM fast_order WHERE status = '10D' and DATE_ADD(createTime ,INTERVAL 3 MINUTE) < NOW() limit 500
SELECT * FROM fast_order WHERE DATE_ADD(createTime ,INTERVAL 3 MINUTE) < NOW() AND createTime > DATE_SUB(NOW(), INTERVAL 30 MINUTE)
SELECT u.merchantNo,c.* from user_credit_card c left JOIN user_binding u on c.userNo = u.userNo where u.merchantNo = 'M59955' AND c.bindChannelList <> '3002'
DELETE c from user_credit_card c left JOIN user_binding u on c.userNo = u.userNo where u.merchantNo = 'M59955' AND c.bindChannelList <> '3002'
use u_user;//指定数据库 grant all privileges on *.* to 'fuzi'@'%' IDENTIFIED BY 'fuzi123';//授权 FLUSH PRIVILEGES;//刷新权限
use u_user;//指定数据库 ALTER TABLE u_uncall_task ADD call_capp INT(3) NOT NULL;// 新增call_capp 字段
UPDATE fire_fly_user_card set expirationTime=DATE_ADD(expirationTime ,INTERVAL 1 DAY) WHERE expirationTime < NOW()
9.查询今天的数据
SELECT * FROM ok_coin_userinfo WHERE to_days(createTime) = to_days(now())
10.GROUP BY查询
SELECT productId, sum(ticketChangeNums) as ticketChangeNums FROM ok_novels_fiction_monthticket GROUP BY productId ORDER BY ticketChangeNums DESC
今天的分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。
上一篇
已是最后文章
下一篇
已是最新文章