MySQL
qq_30317889
BUG 虐我千百遍,我待 BUG 如初恋!
展开
-
MySql 动态多列转多行
原数据结构为:目的:要将 prc_ben_type 列数据转为多列标题,并对其数据求和;set @acct_id = '001000001';set @company_code = 'SZWX';set @period_code = '201810';set @city_codes = 'BJS,SHS,GUANGZS,SHENZS'; DROP TEMPORARY TABLE...原创 2020-03-05 17:42:55 · 2309 阅读 · 0 评论 -
mysql中FIND_IN_SET的使用方法
在mysql中,有时我们在做数据库查询时,需要得到某字段中包含某个值的记录,但是它也不是用like能解决的,使用like可能查到我们不想要的记录,它比like更精准,这时候mysql的FIND_IN_SET函数就派上用场了,下面来具体了解一下。FIND_IN_SET(str,strlist)函数str 要查询的字符串strlist 字段名 参数以”,”分隔 如 (1,2,6,8)查询字段(...原创 2020-02-12 19:28:52 · 91 阅读 · 0 评论 -
MySQL里实现类似SPLIT的分割字符串的函数
一,用临时表作为数组复制代码 代码如下:create function f_split(@c varchar(2000),@split varchar(2))returns @t table(col varchar(20))asbeginwhile(charindex(@split,@c)<>0)begininsert @t(col) values (substring...原创 2020-02-12 19:21:41 · 274 阅读 · 0 评论 -
Error Code:1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declarat
Error Code:1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creato...原创 2019-11-25 15:38:21 · 659 阅读 · 0 评论 -
MySql 链接报错“Client does not support authentication protocol requested by server; consider upgradin”
Navicat 链接 Mysql 提示:client does not support authentication protocol requested by server,consider upgrading mysql client。VS Code 链接 Mysql 提示:client does not support authentication protocol requeste...原创 2019-11-07 16:05:44 · 720 阅读 · 0 评论