github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_like.result (about) 1 select 'ab' like '__' as result; 2 result 3 true 4 select 'ab' like '_%' as result; 5 result 6 true 7 select 'ab' like '%' as result; 8 result 9 true 10 select 'ab' like 'a_' as result; 11 result 12 true 13 select 'ab' like '_b' as result; 14 result 15 true 16 select 'ab' like '%' as result; 17 result 18 true 19 select 'ab' like '*' as result; 20 result 21 false 22 select '*' like '*' as result; 23 result 24 true 25 select '**' like '**' as result; 26 result 27 true 28 select '**' like '*_' as result; 29 result 30 true 31 select '**' like '*^' as result; 32 result 33 false 34 select '(_a)' like '(_a)'; 35 result 36 true 37 drop table if exists t1; 38 create table t1(a int, b varchar(100)); 39 insert into t1 values(1 , "PowerSlave"); 40 insert into t1 values(2 , "Powerage"); 41 insert into t1 values( 3 , "Singing Down the Lane" ); 42 insert into t1 values(4 , "Ziltoid the Omniscient"); 43 insert into t1 values(5 , "Casualties of Cool"); 44 insert into t1 values( 6 , "Epicloud"); 45 insert into t1 values(7 , "Somewhere in Time"); 46 insert into t1 values(8 , "Piece of Mind"); 47 insert into t1 values( 9 , "Killers"); 48 insert into t1 values(10 , "No Prayer for the Dying"); 49 insert into t1 values(11 , "No Sound Without Silence"); 50 insert into t1 values(12 , "Big Swing Face"); 51 insert into t1 values(13 , "Blue Night"); 52 insert into t1 values(14 , "Eternity"); 53 insert into t1 values(15 , "Scandinavia"); 54 insert into t1 values(16 , "Long Lost Suitcase"); 55 insert into t1 values(17 , "Praise and Blame"); 56 insert into t1 values(18 , "Along Came Jones"); 57 insert into t1 values(19 , "All Night Wrong"); 58 insert into t1 values(20 , "The Sixteen Men of Tain"); 59 SELECT a, b 60 FROM t1 61 WHERE b like 'Power%'; 62 a b 63 1 PowerSlave 64 2 Powerage 65 drop table t1; 66 create table t1 (str1 varchar(25),str2 char(25)); 67 insert into t1 values('a1','b1'),('a2', 'b2'),('%str1%', '%str2%'); 68 select * from t1 where str1 like "%\%"; 69 str1 str2 70 %str1% %str2% 71 select * from t1 where str1 like "\%%"; 72 str1 str2 73 %str1% %str2% 74 select json_extract('{"a":1}', '$.a') like '1' as result; 75 result 76 true 77 select json_extract('{"a":1}', '$.a') like 1 as result; 78 result 79 true 80 select json_extract('{"a":"1"}', '$.a') like '1' as result; 81 result 82 false 83 select json_extract('{"a":"1"}', '$.a') like 1 as result; 84 result 85 false 86 select json_extract('{"a":"1"}', '$.a') like '%1%' as result; 87 result 88 true 89 select json_unquote(json_extract('{"a":"1"}', '$.a')) like '1' as result; 90 result 91 true 92 select json_unquote(json_extract('{"a":"1"}', '$.a')) like 1 as result; 93 result 94 true