github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_string_instr.result (about) 1 select instr('aaa','a'); 2 instr(aaa, a) 3 1 4 select instr('aaa','ax'); 5 instr(aaa, ax) 6 0 7 select instr('aaa','aa'); 8 instr(aaa, aa) 9 1 10 select instr('aaa',1); 11 instr(aaa, 1) 12 0 13 select instr('aaa','b'); 14 instr(aaa, b) 15 0 16 select instr(null,'a'); 17 instr(null, a) 18 null 19 select instr(1,null); 20 instr(1, null) 21 null 22 select instr(null,null); 23 instr(null, null) 24 null 25 select instr(null,'a'); 26 instr(null, a) 27 null 28 select instr('','啊'); 29 instr(, 啊) 30 0 31 select instr('','a'); 32 instr(, a) 33 0 34 select instr('',' '); 35 instr(, ) 36 0 37 select instr('',''); 38 instr(, ) 39 1 40 select instr('啊',''); 41 instr(啊, ) 42 1 43 select instr('啊',' '); 44 instr(啊, ) 45 0 46 select instr('啊','啊'); 47 instr(啊, 啊) 48 1 49 select instr('x啊','啊'); 50 instr(x啊, 啊) 51 2 52 select instr('x啊啦啦啦啦啦的','啦'); 53 instr(x啊啦啦啦啦啦的, 啦) 54 3 55 select instr('x啊啦啦啦啦啦的q','的'); 56 instr(x啊啦啦啦啦啦的q, 的) 57 8 58 select instr('x啊啦啦啦啦啦的q','q'); 59 instr(x啊啦啦啦啦啦的q, q) 60 9 61 create table t1(a varchar,b varchar); 62 insert into t1 values('axa','x'),('abababa','qq'),('qwer','er'); 63 select instr(a,b) from t1; 64 instr(a, b) 65 2 66 0 67 3 68 select instr(a,null) from t1; 69 instr(a, null) 70 null 71 null 72 null 73 select instr(null,b) from t1; 74 instr(null, b) 75 null 76 null 77 null 78 select instr('axa','x') from t1; 79 instr(axa, x) 80 2 81 2 82 2 83 select instr(a,'qw') from t1; 84 instr(a, qw) 85 0 86 0 87 1 88 select instr('qwer',b) from t1; 89 instr(qwer, b) 90 0 91 0 92 3 93 insert into t1 values('','啊'),('','a'),('',' '),('',''),('啊',''),('啊',' '),('啊','啊'),('x啊','啊'),('x啊啦啦啦啦啦的','啦'),('x啊啦啦啦啦啦的q','的'),('x啊啦啦啦啦啦的q','q'); 94 select instr(a,b) from t1; 95 instr(a, b) 96 2 97 0 98 3 99 0 100 0 101 0 102 1 103 1 104 0 105 1 106 2 107 3 108 8 109 9