【发布时间】:2016-06-30 17:39:47
【问题描述】:
我有一个配置单元表列表,并且想要选择最后一个表来执行一些查询。 这是我用来获取类似配置单元表列表的方法。
show tables 'test_temp_table*';
显示如下结果
test_temp_table_1
test_temp_table_2
test_temp_table_3
test_temp_table_4
test_temp_table_5
test_temp_table_6
我需要在 test_temp_table_6 上运行一些查询。我可以使用 shell 脚本通过将输出写入临时文件并从中读取最后一个值来做到这一点,但是有没有一种简单的方法使用配置单元查询来获取最后一个具有最大数量的表?
【问题讨论】: