MySql
程旭媛_jsjrjz08
这个作者很懒,什么都没留下…
展开
-
多级父子级查询
表结构如下:good_id, good_name, parent_id(父id)1, a, 02, b, 03, a2_0, 14, a2_1, 15, a2_0_0, ...2016-04-14 12:25:59 · 339 阅读 · 0 评论 -
安装mysql5.7(压缩版)
1.解压2.配置MYSQL_HOME,PATH3.配置my.ini 将%MYSQL_HOME%下的my-default.ini复制一份并重命名为my.ini,编辑: [mysqld] # These are commonly set, remove the # and set as required. basedir =[%MYSQL_HOME%] datadir =...2016-04-19 13:06:57 · 100 阅读 · 0 评论 -
MySql行列转换
数据样本: create table tx( id int primary key, c1 char(2), c2 char(2), c3 int ); insert into tx values (1 ,'A1','B1',9), (2 ,'A2','B1',7), (3 ,'A3','B1',4), (4 ,'A4','B1',2), (5 ,'A1','B2',2...原创 2015-09-22 16:27:37 · 235 阅读 · 0 评论 -
Mysql自带函数
1. IFNULL()函数格式:IFNULL(expr1,expr2)说明:如果expr1不是NULL,IFNULL()返回expr1,否则它返回expr2。IFNULL()返回一个数字或字符串值,取决于它被使用的上下文环境。举例:mysql> SELECT IFNULL(1,0);+-------------+| IFNULL(1,0) |+------------...原创 2015-09-22 16:52:10 · 87 阅读 · 0 评论