1. 程式人生 > >mysql 變量定義 sql查詢

mysql 變量定義 sql查詢

ada clas oca light subst adapt 變量 time NPU

SET @idnoStr:=‘"idNo":"‘;
SELECT LOCATE(@idnoStr, param_array),
LOCATE(‘",‘, param_array,LOCATE(‘"idNo":"‘, param_array)),
SUBSTR(param_array,LOCATE(‘"idNo":"‘, param_array),
LOCATE(‘",‘, param_array,LOCATE(‘"idNo":"‘, param_array))-LOCATE(‘"idNo":"‘, param_array)
)
param_array FROM t_gl_adapter_param_input
 where creat_time BETWEEN ‘2018-12-01 16:37:41‘ and ‘2019-01-01 23:59:59‘
and service_type=‘qianhaiHaoxinduHcService‘
and param_array like ‘{"app%‘

  見第一行

mysql 變量定義 sql查詢