[root@mcs125 ~]# mcsmysql
|
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 21
|
Server version: 10.3.16-MariaDB-log Columnstore 1.2.5-1
|
|
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
MariaDB [(none)]>
|
MariaDB [(none)]> create table test.T(col1 varchar(5)) engine columnstore;
|
Query OK, 0 rows affected (0.223 sec)
|
|
MariaDB [(none)]> insert into test.T values ('abc'),('def');
|
Query OK, 2 rows affected (0.261 sec)
|
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [(none)]> SELECT REGEXP_SUBSTR(col1, '[a-z]+') from test.T;
|
+-------------------------------+
|
| REGEXP_SUBSTR(col1, '[a-z]+') |
|
+-------------------------------+
|
| abc |
|
| def |
|
+-------------------------------+
|
2 rows in set (0.059 sec)
|
|
MariaDB [(none)]> insert into test.T values ('123');
|
Query OK, 1 row affected (0.119 sec)
|
|
MariaDB [(none)]> SELECT REGEXP_SUBSTR(col1, '[a-z]+') from test.T;
|
+-------------------------------+
|
| REGEXP_SUBSTR(col1, '[a-z]+') |
|
+-------------------------------+
|
| abc |
|
| def |
|
| |
|
+-------------------------------+
|
3 rows in set (0.012 sec)
|
|
MariaDB [(none)]> show create table test.T
|
-> ;
|
+-------+-------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-------------------------------------------------------------------------------------------------+
|
| T | CREATE TABLE `t` (
|
`col1` varchar(5) DEFAULT NULL
|
) ENGINE=Columnstore DEFAULT CHARSET=latin1 |
|
+-------+-------------------------------------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|