随笔分类 -  MySql

摘要:https://www.cnblogs.com/KdeS/p/13186165.html 一.问题描述 MySQL中使用order by对字段进行排序的时候,如果是降序排序,那字段值为null的记录会排在最后,但是如果是升序排序,那字段为null的记录会排在最前面。 ​ 目前碰到一个需求,就是根据字 阅读全文
posted @ 2021-12-06 16:03 JIN__JIN 阅读(229) 评论(0) 推荐(0)
摘要:select distinct column_name,column_comment,column_type from information_schema.columns where table_name = '表名' and TABLE_schema='数据库名' order by ordina 阅读全文
posted @ 2016-06-29 16:05 JIN__JIN 阅读(205) 评论(0) 推荐(0)
摘要:个人经验: 服务器中已有mysql5.0 现要安装mysql5.5 下载安装包,安装后,mysql5.5中没有my.ini文件,就在我自己的电脑上复制了mysql5.5的my.ini文件进去。 1。在my.ini文件的client上增加如下语句 2。安装服务,根据下图照壶画瓢,安装自己的mysql服 阅读全文
posted @ 2016-06-07 18:19 JIN__JIN 阅读(652) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/k8080880/article/details/11253305 select case when pid=0 then case when @prevType=QUETYPE_ID then @rank:=@rank+1 when @prevType:= 阅读全文
posted @ 2016-05-19 17:38 JIN__JIN 阅读(1664) 评论(0) 推荐(0)
摘要:case when ifnull(G.STATE2,'0')='0' and ifnull(H.SUBMIT_TYPE,'1')='1' then exists(select 1 from t2 where H_ID=G.H_ID) else '1' end as iscan 阅读全文
posted @ 2016-05-16 17:32 JIN__JIN 阅读(1524) 评论(0) 推荐(0)
摘要:http://blog.chinaunix.net/uid-11640640-id-3426908.html mysql性能优化-慢查询分析、优化索引和配置 2012-11-30 15:18:42 分类: Mysql/postgreSQL 目录 一、优化概述 二、查询与索引优化分析 1性能瓶颈定位 阅读全文
posted @ 2016-05-04 14:14 JIN__JIN 阅读(416) 评论(0) 推荐(0)
摘要:方法1: 用SET PASSWORD命令 首先登录MySQL。 格式:mysql> set password for 用户名@localhost = password('新密码'); 例子:mysql> set password for root@localhost = password('123' 阅读全文
posted @ 2016-03-31 09:07 JIN__JIN 阅读(173) 评论(0) 推荐(0)