随笔分类 -  MySql数据库

摘要:https://www.cnblogs.com/ssslinppp/p/6178636.html use information_schema;selectengine,table_name,table_rows,data_length,index_lengthfrom tables where T 阅读全文
posted @ 2019-07-16 11:32 点点_滴滴 阅读(775) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/hongyuancao/article/details/85220176 阅读全文
posted @ 2019-07-10 15:13 点点_滴滴 阅读(113) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/shuilangyizu/p/8036620.html 阅读全文
posted @ 2019-07-06 12:11 点点_滴滴 阅读(352) 评论(0) 推荐(0)
摘要:SELECT (@i:=@i+1) i,user_id,user_name FROM dt_user_all_orders, (SELECT @i:=0) as i 阅读全文
posted @ 2019-07-05 11:28 点点_滴滴 阅读(2316) 评论(0) 推荐(0)
摘要:alter table 表名 add 字段 varchar(500) comment '备注' default 0 after 字段; 阅读全文
posted @ 2017-01-10 15:02 点点_滴滴 阅读(208) 评论(0) 推荐(0)
摘要:set @num= 1000;update table set a= @num:=@num+1; set @date=now();UPDATE Orders t SET t.CreateTime = (@date:=@date+ INTERVAL 1 HOUR); 阅读全文
posted @ 2017-01-09 19:20 点点_滴滴 阅读(163) 评论(0) 推荐(0)
摘要:update table_aInner JOIN table_bon table_a.id= table_b.idset table_a.Duration = table_b.Duration 阅读全文
posted @ 2016-09-23 14:32 点点_滴滴 阅读(164) 评论(0) 推荐(0)
摘要:grant all privileges on *.* to 'root'@'192.168.2.204' identified by '123456' with grant option;flush privileges; 可直接用下面的,上面的执行之后,仅本机可以用ip进行链接,还是不能远程链接 阅读全文
posted @ 2016-06-15 17:42 点点_滴滴 阅读(212) 评论(0) 推荐(0)
摘要:select * from tablename limit 1,4即取出第2条至第5条,4条记录 阅读全文
posted @ 2016-01-26 15:03 点点_滴滴 阅读(133) 评论(0) 推荐(0)
摘要:首先将sql server DateTime 转换为varchar(50)然后更新转换过的 DateTime字段,UPDATE 表名 SET LastUpdateTime=CONVERT(VARCHAR(50),cast(LastUpdateTime as datetime),120),Create... 阅读全文
posted @ 2015-11-19 20:15 点点_滴滴 阅读(601) 评论(0) 推荐(0)
摘要:分割字符串group_concat(a.EvidencesID separator ',') as EvidencesID#在MySQL配置文件(my.ini)中默认无该配置项,使用默认值时,值为1024;#要彻底修改,在MySQL配置文件(my.ini)中加上group_concat_max_le... 阅读全文
posted @ 2015-09-21 11:28 点点_滴滴 阅读(156) 评论(0) 推荐(0)
摘要:如图查看表的属性:InnoDB 支持事务。MyISAM 不支持事务,不过性能更优越。 阅读全文
posted @ 2015-07-15 16:02 点点_滴滴 阅读(331) 评论(0) 推荐(0)
摘要:1 DECLARE t_error INTEGER DEFAULT 0; 2 DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET t_error=1; 3 START TRANSACTION; 7 ... 阅读全文
posted @ 2015-07-01 16:51 点点_滴滴 阅读(181) 评论(0) 推荐(0)
摘要:boolean在MySQL里的类型为tinyint(1)很奇怪。 阅读全文
posted @ 2015-07-01 16:46 点点_滴滴 阅读(2019) 评论(0) 推荐(0)
摘要:错误:The user specified as a definer ('root'@'%') does not exist解决:grantallprivilegeson*.*toroot@"%"identifiedby".";flushprivileges; 阅读全文
posted @ 2015-06-30 18:01 点点_滴滴 阅读(249) 评论(0) 推荐(0)
摘要:现在出现这个问题,将编码字符串改成utf8 之后 数据表 还是不能存储中文。看如下两张图,应该会有启发:这下应该明白了吧。 阅读全文
posted @ 2015-05-20 11:28 点点_滴滴 阅读(146) 评论(0) 推荐(0)
摘要:如图显示:安装mysql之后,存入中文出现乱码解决方案:找到如图的文件位置打开进行如图的修改:结果: 阅读全文
posted @ 2015-05-20 10:42 点点_滴滴 阅读(205) 评论(0) 推荐(0)