MapReduce服务 MRS-SHOW TABLES:示例

时间:2023-11-01 16:25:29

示例

--创建测试表Create table show_table1(a int);Create table show_table2(a int);Create table showtable5(a int);Create table intable(a int);Create table fromtable(a int); --匹配单字符'_'show tables in  default like 'show_table_';  Table    ------------- show_table1  show_table2 (2 rows) --匹配多字符'*','%'show tables in default like 'show%';Table    ------------- show_table1  show_table2  showtable5  (3 rows) show tables in default like 'show*';Table    ------------- show_table1  show_table2  showtable5  (3 rows) --转义字符使用,第二个示例将'_'作为过滤条件,结果集不包含showtable5  show tables in default like 'show_%';    Table    ------------- show_table1  show_table2  showtable5  (3 rows) show tables in default like 'show$_%' ESCAPE '$';    Table    ------------- show_table1  show_table2 (2 rows) --同时满足多个条件,查询default中'show_'开头或者'in'开头的表show tables in default like 'show$_%|in%' ESCAPE '$';    Table    ------------- intable      show_table1  show_table2 (3 rows)
support.huaweicloud.com/cmpntguide-lts-mrs/mrs_01_249042.html