github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_like.test (about) 1 #like 2 select 'ab' like '__' as result; 3 select 'ab' like '_%' as result; 4 select 'ab' like '%' as result; 5 select 'ab' like 'a_' as result; 6 select 'ab' like '_b' as result; 7 select 'ab' like '%' as result; 8 select 'ab' like '*' as result; 9 select '*' like '*' as result; 10 select '**' like '**' as result; 11 select '**' like '*_' as result; 12 select '**' like '*^' as result; 13 select '(_a)' like '(_a)'; 14 drop table if exists t1; 15 create table t1(a int, b varchar(100)); 16 insert into t1 values(1 , "PowerSlave"); 17 insert into t1 values(2 , "Powerage"); 18 insert into t1 values( 3 , "Singing Down the Lane" ); 19 insert into t1 values(4 , "Ziltoid the Omniscient"); 20 insert into t1 values(5 , "Casualties of Cool"); 21 insert into t1 values( 6 , "Epicloud"); 22 insert into t1 values(7 , "Somewhere in Time"); 23 insert into t1 values(8 , "Piece of Mind"); 24 insert into t1 values( 9 , "Killers"); 25 insert into t1 values(10 , "No Prayer for the Dying"); 26 insert into t1 values(11 , "No Sound Without Silence"); 27 insert into t1 values(12 , "Big Swing Face"); 28 insert into t1 values(13 , "Blue Night"); 29 insert into t1 values(14 , "Eternity"); 30 insert into t1 values(15 , "Scandinavia"); 31 insert into t1 values(16 , "Long Lost Suitcase"); 32 insert into t1 values(17 , "Praise and Blame"); 33 insert into t1 values(18 , "Along Came Jones"); 34 insert into t1 values(19 , "All Night Wrong"); 35 insert into t1 values(20 , "The Sixteen Men of Tain"); 36 SELECT a, b 37 FROM t1 38 WHERE b like 'Power%'; 39 drop table t1; 40 create table t1 (str1 varchar(25),str2 char(25)); 41 insert into t1 values('a1','b1'),('a2', 'b2'),('%str1%', '%str2%'); 42 select * from t1 where str1 like "%\%"; 43 select * from t1 where str1 like "\%%"; 44 45 select json_extract('{"a":1}', '$.a') like '1' as result; 46 select json_extract('{"a":1}', '$.a') like 1 as result; 47 select json_extract('{"a":"1"}', '$.a') like '1' as result; 48 select json_extract('{"a":"1"}', '$.a') like 1 as result; 49 select json_extract('{"a":"1"}', '$.a') like '%1%' as result; 50 select json_unquote(json_extract('{"a":"1"}', '$.a')) like '1' as result; 51 select json_unquote(json_extract('{"a":"1"}', '$.a')) like 1 as result;