ClickHouse/dbms/tests/queries/0_stateless/00765_sql_compatibility_aliases.sql

22 lines
585 B
MySQL
Raw Normal View History

SET send_logs_level = 'none';
select lcase('FOO');
select ucase('foo');
select LOWER('Foo');
select UPPER('Foo');
2018-12-06 13:23:45 +00:00
select REPLACE('bar', 'r', 'z');
2018-12-06 13:36:23 +00:00
select Locate('foo', 'o');
select SUBSTRING('foo', 1, 2);
select Substr('foo', 2);
select mid('foo', 3);
select IF(3>2, 1, 0);
select substring('foo' from 1 + 1);
select SUBSTRING('foo' FROM 2 FOR 1);
select left('foo', 2);
select RIGHT('bar', 1);
select ltrim(' foo');
select RTRIM(' foo ');
select trim(TRAILING 'x' FROM 'xxfooxx');
select Trim(LEADING 'ab' FROM 'abbafooabba');
select TRIM(both 'ab' FROM 'abbafooabbafooabba');