
mysql
文章平均质量分 53
moots_
取乎其上,得乎其中;取乎其中,得乎其下;取乎其下,则无所得矣
展开
-
mariadb的日志
缘由:客户环境上莫名出现资源消失,数据库不知道什么时候做了这个操作,所以去补充了数据库日志相关的知识日志类别The error logAlways enabledUsually a file in the data directory, but some distributions may movethis to other locations.All critical errors are logged here.One can get warnings to be logged by s原创 2020-07-21 22:41:58 · 366 阅读 · 0 评论 -
Mysql常用
文章目录mysql的语句的执行过程mysql的优化器优化判null外键约束与级联操作mysql的语句的执行过程fromjoinonwheregroup by (从此处开始可以使用select中指定的别名)avg、sum、maxhavingselectdistinctorder bymysql的优化器优化判nullISNULL(xxx):只有xxx为null 的时候...原创 2020-01-05 23:36:36 · 135 阅读 · 0 评论 -
MyBatis 关于order by失效
order by作为一个常用的功能,在项目中应该经常用到。 今天在实现根据传入排序指标参数进行排序时,遇到order by没有生效问题。 起先SQL如下: 我用的是 (1):#运算符,Mybatis会将传入的对象当成一个字符串,在进行变量替换时会加上引号比如rankingMethod="time", sql语句是ODERR BY "time" DESC...原创 2018-11-22 10:52:41 · 4349 阅读 · 0 评论 -
mysql中int(10)代表什么意思
int(M) 在 integer 数据类型中,M 表示最大显示宽度。在 int(M) 中,M 的值跟 int(M) 所占多少存储空间并无任何关系。 int(3)、int(4)、int(8) 在磁盘上都是占用 4 btyes 的存储空间。说白了,除了显示给用户的方式有点不同外,int(M) 跟 int 数据类型是相同的。如果int的值为10int(10)显示结果为0000000010int(...转载 2018-11-17 18:36:42 · 12083 阅读 · 0 评论