简单学习mysql日志管理

发布时间:2020-05-09 11:26:49 作者:三月
来源:亿速云 阅读:158

本文主要给大家介绍mysql日志管理,文章内容都是笔者用心摘选和编辑的,具有一定的针对性,对大家的参考意义还是比较大的,下面跟笔者一起了解下mysql日志管理吧。                                                        

创建一个表

    create table test_student(
         id int auto_increment,
         firstName varchar(10) not null,
         lastName varchar(10) nont null,
         addtime date,
         primary key(id)
    
    )engine=innodb character set=utf8
    
插入语句

insert into test_student set firstName="zhang",lastName="san",addtime='2001-02-02';

insert into test_student set firstName="zhang",lastName="tian",addtime='2001-03-02';

insert into test_student set firstName="li",lastName="tian",addtime='2003-03-02';

查找 addtime 在等于 3月份的学生

select * from test_student where month(addtime)='03';

查找 addtime 等于 2001 年的学生

select * from test_student where year(addtime) ='2001';

//日期函数
// 返回日期date是星期几(1=星期天,2=星期一,……7=星期六,ODBC标准)
select dayofweek('2017-04-22') 返回  7;

看完以上关于mysql日志管理,很多读者朋友肯定多少有一定的了解,如需获取更多的行业知识信息 ,可以持续关注我们的行业资讯栏目的。


推荐阅读:
  1. 日志管理
  2. MySQL如何实现日志管理

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

mysql日志管理

上一篇:collection的用法

下一篇:css中text-decoration-style属性的作用是什么

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》