mysql
yizhizouxiaqu
这个作者很懒,什么都没留下…
展开
-
mysql存储过程,批量增加数据
为了测试需要,需要向数据库中插入一批数据,采用存储过程来做,具体需求如下:时间按一定间隔动态增加,同时更改除了时间之外的某些值drop procedure if exists insertTestData; create procedure insertTestData()begindeclare dt datetime;declare counter int;declare m原创 2012-04-16 19:39:44 · 1844 阅读 · 0 评论 -
Error Code: 1267. Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT
Mysql查询报错Error Code: 1267. Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='0.001 sec提示两个表的编码不一致,需要进行转换将比较等式一边进行字符串转换,如改为“CONVERT(table-co转载 2013-01-04 18:30:01 · 29702 阅读 · 2 评论 -
mysql 批量删除数据库中的所有数据
select CONCAT("truncate ", table_name, ";") from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='clouddrive_00'来自:转载 2014-04-18 09:40:47 · 2137 阅读 · 0 评论