https://blog.csdn.net/zhengxiuchen86/article/details/81220779 mysql
1.判断子串substr在字符串str中出现的位置sql
例子:查询']'在‘OP1010_GetData_Lim_MinMax[1]_Min’中第一次出现的位置sqlserver
--mysql
select LOCATE(']','OP1010_GetData_Lim_MinMax[1]_Min',27); select instr('OP1010_GetData_Lim_MinMax[1]_Min',']'); select position(']' in 'OP1010_GetData_Lim_MinMax[1]_Min');
结果以下:spa
--sqlserver
select CHARINDEX(']','OP1010_GetData_Lim_MinMax[1]_Min') as index_ ;
结果以下:.net