这篇承接上一篇<mysql必会sql语句>:http://blog.csdn.net/qq_32059827/article/details/51763950 这一篇属于加强版,问题和sql语句如下. 创建users表,设置id,name,gender,sal字段,其中id为主键 drop table if exists users; create table if not exists users( id int(5) primary key auto_increment, name var…
3.查看库表的最后mysql修改时间, 如果第一次新建的表可能还没有update_time,所以这里用了ifnull,当update_time为null时用create_time替代 select TABLE_SCHEMA, TABLE_NAME,ifnull(update_time , create_time) from information_schema.TABLES where TABLE_SCHEMA='table_name' order by ifnull(update_time ,…