github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_string_rtrim_ltrim.result (about) 1 SELECT RTRIM('barbar '); 2 RTRIM('barbar ') 3 barbar 4 SELECT LTRIM(' barbar'); 5 LTRIM(' barbar') 6 barbar 7 SELECT ' geeksforgeeks' As OriginalString, 8 LTRIM (' geeksforgeeks') AS LeftTrimmedString; 9 OriginalString LeftTrimmedString 10 geeksforgeeks geeksforgeeks 11 SELECT ' MySQL' AS String, RTRIM ('MySQL') AS Tstring; 12 String Tstring 13 MySQL MySQL 14 select cast(rtrim(' 20.06 ') as decimal(19,2)); 15 cast(rtrim( 20.06 ) as decimal(19, 2)) 16 20.06 17 select cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2)); 18 cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2)) 19 20.06 20 select concat_ws(':',ltrim(' left '),':',rtrim(' right '),':'); 21 concat_ws(':',ltrim(' left '),':',rtrim(' right '),':') 22 left ::: right:: 23 CREATE TABLE t (a int NOT NULL); 24 INSERT INTO t values(21123); 25 SELECT 1 FROM t WHERE rtrim(a & NULL); 26 '&' operator is not supported now 27 SELECT 1 FROM t WHERE ltrim(a & NULL); 28 '&' operator is not supported now 29 DROP TABLE t; 30 drop table if exists `T1`; 31 drop table if exists `T2`; 32 drop table if exists `T3`; 33 drop table if exists `T4`; 34 drop table if exists `T5`; 35 drop table if exists `T6`; 36 drop table if exists `T7`; 37 drop table if exists `T8`; 38 drop table if exists `T9`; 39 CREATE TABLE `T1` (`C1` char(80)); 40 CREATE TABLE `T2` (`C1` char(80)); 41 CREATE TABLE `T3` (`C1` char(80)); 42 CREATE TABLE `T4` (`C1` char(80)); 43 CREATE TABLE `T5` (`C1` char(80)); 44 CREATE TABLE `T6` (`C1` char(80)); 45 CREATE TABLE `T7` (`C1` char(80)); 46 CREATE TABLE `T8` (`C1` char(80)); 47 CREATE TABLE `T9` (`C1` char(80)); 48 INSERT INTO `T1` VALUES ('アイウエオ'); 49 INSERT INTO `T1` VALUES ('アイウエオ '); 50 INSERT INTO `T1` VALUES ('アイウエオ '); 51 INSERT INTO `T1` VALUES ('アイウエオ '); 52 INSERT INTO `T1` VALUES ('アイウエオ '); 53 INSERT INTO `T1` VALUES ('アイウエオ '); 54 INSERT INTO `T1` VALUES ('アイウエオ '); 55 INSERT INTO `T2` VALUES ('あいうえお'); 56 INSERT INTO `T2` VALUES ('あいうえお '); 57 INSERT INTO `T2` VALUES ('あいうえお '); 58 INSERT INTO `T2` VALUES ('あいうえお '); 59 INSERT INTO `T2` VALUES ('あいうえお '); 60 INSERT INTO `T2` VALUES ('あいうえお '); 61 INSERT INTO `T2` VALUES ('あいうえお '); 62 INSERT INTO `T3` VALUES ('龔龖龗龞龡'); 63 INSERT INTO `T3` VALUES ('龔龖龗龞龡 '); 64 INSERT INTO `T3` VALUES ('龔龖龗龞龡 '); 65 INSERT INTO `T3` VALUES ('龔龖龗龞龡 '); 66 INSERT INTO `T3` VALUES ('龔龖龗龞龡 '); 67 INSERT INTO `T3` VALUES ('龔龖龗龞龡 '); 68 INSERT INTO `T3` VALUES ('龔龖龗龞龡 '); 69 INSERT INTO `T4` VALUES ('アイウエオ'); 70 INSERT INTO `T4` VALUES ('アイウエオ '); 71 INSERT INTO `T4` VALUES ('アイウエオ '); 72 INSERT INTO `T4` VALUES ('アイウエオ '); 73 INSERT INTO `T4` VALUES ('アイウエオ '); 74 INSERT INTO `T4` VALUES ('アイウエオ '); 75 INSERT INTO `T4` VALUES ('アイウエオ '); 76 INSERT INTO `T5` VALUES ('あいうえお'); 77 INSERT INTO `T5` VALUES ('あいうえお '); 78 INSERT INTO `T5` VALUES ('あいうえお '); 79 INSERT INTO `T5` VALUES ('あいうえお '); 80 INSERT INTO `T5` VALUES ('あいうえお '); 81 INSERT INTO `T5` VALUES ('あいうえお '); 82 INSERT INTO `T5` VALUES ('あいうえお '); 83 INSERT INTO `T6` VALUES ('龔龖龗龞龡'); 84 INSERT INTO `T6` VALUES ('龔龖龗龞龡 '); 85 INSERT INTO `T6` VALUES ('龔龖龗龞龡 '); 86 INSERT INTO `T6` VALUES ('龔龖龗龞龡 '); 87 INSERT INTO `T6` VALUES ('龔龖龗龞龡 '); 88 INSERT INTO `T6` VALUES ('龔龖龗龞龡 '); 89 INSERT INTO `T6` VALUES ('龔龖龗龞龡 '); 90 INSERT INTO `T7` VALUES ('アイウエオ'); 91 INSERT INTO `T7` VALUES ('アイウエオ '); 92 INSERT INTO `T7` VALUES ('アイウエオ '); 93 INSERT INTO `T7` VALUES ('アイウエオ '); 94 INSERT INTO `T7` VALUES ('アイウエオ '); 95 INSERT INTO `T7` VALUES ('アイウエオ '); 96 INSERT INTO `T7` VALUES ('アイウエオ '); 97 INSERT INTO `T8` VALUES ('あいうえお'); 98 INSERT INTO `T8` VALUES ('あいうえお '); 99 INSERT INTO `T8` VALUES ('あいうえお '); 100 INSERT INTO `T8` VALUES ('あいうえお '); 101 INSERT INTO `T8` VALUES ('あいうえお '); 102 INSERT INTO `T8` VALUES ('あいうえお '); 103 INSERT INTO `T8` VALUES ('あいうえお '); 104 INSERT INTO `T9` VALUES ('龔龖龗龞龡'); 105 INSERT INTO `T9` VALUES ('龔龖龗龞龡 '); 106 INSERT INTO `T9` VALUES ('龔龖龗龞龡 '); 107 INSERT INTO `T9` VALUES ('龔龖龗龞龡 '); 108 INSERT INTO `T9` VALUES ('龔龖龗龞龡 '); 109 INSERT INTO `T9` VALUES ('龔龖龗龞龡 '); 110 INSERT INTO `T9` VALUES ('龔龖龗龞龡 '); 111 SELECT RTRIM(`C1`) from `T1`; 112 RTRIM(`C1`) 113 アイウエオ 114 アイウエオ 115 アイウエオ 116 アイウエオ 117 アイウエオ 118 アイウエオ 119 アイウエオ 120 SELECT RTRIM(`C1`) from `T2`; 121 RTRIM(`C1`) 122 あいうえお 123 あいうえお 124 あいうえお 125 あいうえお 126 あいうえお 127 あいうえお 128 あいうえお 129 SELECT RTRIM(`C1`) from `T3`; 130 RTRIM(`C1`) 131 龔龖龗龞龡 132 龔龖龗龞龡 133 龔龖龗龞龡 134 龔龖龗龞龡 135 龔龖龗龞龡 136 龔龖龗龞龡 137 龔龖龗龞龡 138 SELECT RTRIM(`C1`) from `T4`; 139 RTRIM(`C1`) 140 アイウエオ 141 アイウエオ 142 アイウエオ 143 アイウエオ 144 アイウエオ 145 アイウエオ 146 アイウエオ 147 SELECT RTRIM(`C1`) from `T5`; 148 RTRIM(`C1`) 149 あいうえお 150 あいうえお 151 あいうえお 152 あいうえお 153 あいうえお 154 あいうえお 155 あいうえお 156 SELECT RTRIM(`C1`) from `T6`; 157 RTRIM(`C1`) 158 龔龖龗龞龡 159 龔龖龗龞龡 160 龔龖龗龞龡 161 龔龖龗龞龡 162 龔龖龗龞龡 163 龔龖龗龞龡 164 龔龖龗龞龡 165 SELECT RTRIM(`C1`) from `T7`; 166 RTRIM(`C1`) 167 アイウエオ 168 アイウエオ 169 アイウエオ 170 アイウエオ 171 アイウエオ 172 アイウエオ 173 アイウエオ 174 SELECT RTRIM(`C1`) from `T8`; 175 RTRIM(`C1`) 176 あいうえお 177 あいうえお 178 あいうえお 179 あいうえお 180 あいうえお 181 あいうえお 182 あいうえお 183 SELECT RTRIM(`C1`) from `T9`; 184 RTRIM(`C1`) 185 龔龖龗龞龡 186 龔龖龗龞龡 187 龔龖龗龞龡 188 龔龖龗龞龡 189 龔龖龗龞龡 190 龔龖龗龞龡 191 龔龖龗龞龡 192 DROP TABLE `T1`; 193 DROP TABLE `T2`; 194 DROP TABLE `T3`; 195 DROP TABLE `T4`; 196 DROP TABLE `T5`; 197 DROP TABLE `T6`; 198 DROP TABLE `T7`; 199 DROP TABLE `T8`; 200 DROP TABLE `T9`; 201 drop table if exists `T1`; 202 drop table if exists `T2`; 203 drop table if exists `T3`; 204 drop table if exists `T4`; 205 drop table if exists `T5`; 206 drop table if exists `T6`; 207 drop table if exists `T7`; 208 drop table if exists `T8`; 209 drop table if exists `T9`; 210 SELECT RTRIM(NULL); 211 RTRIM(NULL) 212 null 213 SELECT LTRIM(NULL); 214 LTRIM(NULL) 215 null 216 SELECT RTRIM("你好 "); 217 RTRIM("你好 ") 218 你好 219 SELECT LTRIM(" 你好"); 220 LTRIM(" 你好") 221 你好 222 drop table if exists t1; 223 create table t1(a varchar(255)); 224 insert into t1 select (RTRIM("2017-06-15 ")); 225 insert into t1 select (LTRIM(" 2019-06-25")); 226 insert into t1 select (RTRIM("2017-06-15 ")); 227 insert into t1 select ("2017-06-15 "); 228 select distinct RTRIM(ltrim(a)),LTRIM(rtrim(a)) from t1; 229 RTRIM(ltrim(a)) LTRIM(rtrim(a)) 230 2017-06-15 2017-06-15 231 2019-06-25 2019-06-25 232 drop table t1; 233 drop table if exists t1; 234 create table t1(a INT, b datetime); 235 insert into t1 values(1, "2017-06-15 "),(1, "2019-06-25 "),(2, " 2019-06-25 "),(3, " 2019-06-25 "); 236 select b from t1 group by b having rtrim(ltrim(b))>"2018-01-01"; 237 b 238 2019-06-25 00:00:00 239 drop table t1; 240 create table t1(a INT, b date); 241 create table t2(a INT, b date); 242 insert into t1 values(1, " 2012-10-12 "),(2, " 2004-04-24. "),(3, " 2008-12-04. "),(4, " 2012-03-23. "); 243 invalid argument parsedate, bad value 2004-04-24. 244 insert into t2 values(1, " 2013-04-30 "),(2, " 1994-10-04 "),(3, " 2018-06-04 "),(4, " 2012-10-12 "); 245 SELECT t1.a, t2.a FROM t1 JOIN t2 ON (rtrim(ltrim(t1.b)) = ltrim(rtrim(t2.b))); 246 a a 247 drop table t1; 248 drop table t2; 249 SELECT RTRIM(space(100000000)+"123"); 250 invalid input: the space count is greater than max allowed value 8000 251 SELECT LTRIM("123"+space(100000000)); 252 invalid input: the space count is greater than max allowed value 8000 253 SELECT LTRIM(" 1241241^&@%#^*^!@#&*(!&"); 254 LTRIM(" 1241241^&@%#^*^!@#&*(!&") 255 1241241^&@%#^*^!@#&*(!& 256 SELECT RTRIM("1241241^&@%#^*^!@#&*(!& "); 257 RTRIM("1241241^&@%#^*^!@#&*(!& ") 258 1241241^&@%#^*^!@#&*(!& 259 SELECT RTRIM(" 123 "); 260 RTRIM(" 123 ") 261 123 262 SELECT RTRIM(123124); 263 RTRIM(123124) 264 123124 265 SELECT RTRIM(123.41231); 266 RTRIM(123.41231) 267 123.41231 268 SELECT LTRIM(" 123"); 269 LTRIM(" 123") 270 123 271 SELECT LTRIM(123124); 272 LTRIM(123124) 273 123124 274 SELECT LTRIM(123.41231); 275 LTRIM(123.41231) 276 123.41231