
数据库
zzbxyz
Do what you say, say what you do.
展开
-
MYSQL 5.5不支持字段类型为datetime且默认值为NOW()的建表语句
5.5版本如下建表语句会失败:alter table Test_Time_aa add column tt datetime DEFAULT NOW() comment '测试时间格式'主要是在5.5版本不支持字段类型为datetime且默认值为NOW()的字段同时,也不支持CURRENT_TIMESTAMP,如下:alter table Test_Time_a原创 2017-11-11 16:30:38 · 8181 阅读 · 0 评论 -
几种流行的数据库SQL分页
1.Oracle: select * from ( select row_.*, rownum rownum_ from ( query_SQL ) row_ where rownum == min 2.SQL Server: select top @pagesize * from tablename where id not in (select top @pag转载 2017-10-26 11:29:20 · 440 阅读 · 0 评论