SQL代码如下:
1 select charindex('1,','121,1,1234') 2 select patindex('%1,%','121,1,1234') 3 select charindex('1','121,1,1234') 4 select patindex('%1%','121,1,1234')
运行结果如下:
3
3
1
1
SQL代码如下:
1 select charindex('1,','121,1,1234') 2 select patindex('%1,%','121,1,1234') 3 select charindex('1','121,1,1234') 4 select patindex('%1%','121,1,1234')
运行结果如下:
3
3
1
1