github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_string_reverse.result (about)

     1  SELECT REVERSE('abc');
     2  reverse(abc)
     3  cba
     4  select reverse('abc'),reverse('abcd');
     5  reverse(abc)	reverse(abcd)
     6  cba	dcba
     7  select reverse(NULL);
     8  reverse(null)
     9  null
    10  create table t1 (a varchar(20));
    11  insert into t1 values ("empty"),(""),("hello");
    12  select a,reverse(a) from t1 where reverse(a)="olleh";
    13  a	reverse(a)
    14  hello	olleh
    15  drop table t1;
    16  drop table if exists `T1`;
    17  drop table if exists `T2`;
    18  drop table if exists `T3`;
    19  drop table if exists `T4`;
    20  drop table if exists `T5`;
    21  drop table if exists `T6`;
    22  drop table if exists `T7`;
    23  drop table if exists `T8`;
    24  drop table if exists `T9`;
    25  CREATE TABLE `T1` (`C1` char(50), INDEX(`C1`));
    26  CREATE TABLE `T2` (`C1` char(50), INDEX(`C1`));
    27  CREATE TABLE `T3` (`C1` char(50), INDEX(`C1`));
    28  CREATE TABLE `T4` (`C1` char(50), INDEX(`C1`));
    29  CREATE TABLE `T5` (`C1` char(50), INDEX(`C1`));
    30  CREATE TABLE `T6` (`C1` char(50), INDEX(`C1`));
    31  CREATE TABLE `T7` (`C1` char(50), INDEX(`C1`));
    32  CREATE TABLE `T8` (`C1` char(50), INDEX(`C1`));
    33  CREATE TABLE `T9` (`C1` char(50), INDEX(`C1`));
    34  INSERT INTO `T1` VALUES ('アイウエオ');
    35  INSERT INTO `T2` VALUES ('あいうえお');
    36  INSERT INTO `T3` VALUES ('龔龖龗龞龡');
    37  INSERT INTO `T4` VALUES ('アイウエオ');
    38  INSERT INTO `T5` VALUES ('あいうえお');
    39  INSERT INTO `T6` VALUES ('龔龖龗龞龡');
    40  INSERT INTO `T7` VALUES ('アイウエオ');
    41  INSERT INTO `T8` VALUES ('あいうえお');
    42  INSERT INTO `T9` VALUES ('龔龖龗龞龡');
    43  SELECT REVERSE(`C1`) FROM `T1`;
    44  REVERSE(`C1`)
    45  オエウイア
    46  SELECT REVERSE(`C1`) FROM `T2`;
    47  REVERSE(`C1`)
    48  おえういあ
    49  SELECT REVERSE(`C1`) FROM `T3`;
    50  REVERSE(`C1`)
    51  龡龞龗龖龔
    52  SELECT REVERSE(`C1`) FROM `T4`;
    53  REVERSE(`C1`)
    54  オエウイア
    55  SELECT REVERSE(`C1`) FROM `T5`;
    56  REVERSE(`C1`)
    57  おえういあ
    58  SELECT REVERSE(`C1`) FROM `T6`;
    59  REVERSE(`C1`)
    60  龡龞龗龖龔
    61  SELECT REVERSE(`C1`) FROM `T7`;
    62  REVERSE(`C1`)
    63  オエウイア
    64  SELECT REVERSE(`C1`) FROM `T8`;
    65  REVERSE(`C1`)
    66  おえういあ
    67  SELECT REVERSE(`C1`) FROM `T9`;
    68  REVERSE(`C1`)
    69  龡龞龗龖龔
    70  DROP TABLE `T1`;
    71  DROP TABLE `T2`;
    72  DROP TABLE `T3`;
    73  DROP TABLE `T4`;
    74  DROP TABLE `T5`;
    75  DROP TABLE `T6`;
    76  DROP TABLE `T7`;
    77  DROP TABLE `T8`;
    78  DROP TABLE `T9`;
    79  SELECT REVERSE("你好");
    80  reverse(你好)
    81  好你
    82  SELECT REVERSE("再 见");
    83  reverse(再 见)
    84  见 再
    85  drop table if exists t1;
    86  create table t1(a varchar(255));
    87  insert into t1 select (reverse("abc"));
    88  insert into t1 select (reverse("bcd"));
    89  insert into t1 select (reverse("def"));
    90  insert into t1 select (reverse("xyz"));
    91  insert into t1 select (reverse("1a1"));
    92  select a from t1 group by a having reverse(a)=reverse(a);
    93  a
    94  cba
    95  dcb
    96  fed
    97  zyx
    98  1a1
    99  drop table t1;
   100  drop table if exists t1;
   101  drop table if exists t2;
   102  create table t1(a INT,  b varchar(255));
   103  create table t2(a INT,  b varchar(255));
   104  insert into t1 values(1, "abc"),(1, "bbb"),(3, "aaa"),(4, "2012");
   105  insert into t2 values(1, "abc"),(1, "aaa"),(3, "cba"),(4, "2012");
   106  SELECT distinct t1.a, t2.a FROM t1 JOIN t2 ON (reverse(t1.b) = reverse(t2.b));
   107  a	a
   108  1	1
   109  3	1
   110  4	4
   111  drop table t1;
   112  drop table t2;
   113  SELECT REVERSE("@($)@($#)_@(#");
   114  reverse(@($)@($#)_@(#)
   115  #(@_)#$(@)$(@
   116  SELECT REVERSE(space(500)+space(600));
   117  reverse(space(500) + space(600))
   118                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
   119  SELECT REVERSE(123124);
   120  reverse(123124)
   121  421321
   122  SELECT REVERSE(123.124);
   123  reverse(123.124)
   124  421.321
   125  SELECT REVERSE(0.3414);
   126  reverse(0.3414)
   127  4143.0
   128  SELECT REVERSE("2023-04-24");
   129  reverse(2023-04-24)
   130  42-40-3202
   131  SELECT REVERSE("10:03:23.021412");
   132  reverse(10:03:23.021412)
   133  214120.32:30:01