将范围都包含在两个边界中的行分割

问题描述 投票:0回答:1

具有一个包含包含以下内容的表的数据库:

rangeA
------------------------|
[400,800]               |
[350,2000]              |
[400,800]               |
[400,800]               |
[400,800]               |
[400,800]               |
[400,800]               |
[400,800]               |
[400,800]               |
[400,800]               |

您将如何将该列删除到[[each表中,并替换为

lower|upper| -----|-----| 400| 800| 350| 2000| 400| 800| 400| 800| 400| 800| 400| 800| 400| 800| 400| 800| 400| 800| 400| 800|
我已经成功地通过:]检索了列名和表名。

select column_name, table_name from DATABASE.information_schema.columns where MYCONDITION) -- The condition is well chosen to retrieve only the column with the range

当然,当检索到行时,可以使用函数lowerupper来检索边界

具有一个包含表的数据库,该表包含:rangeA ------------------------ | [400,800] | [350,2000] | [400,800] | [400,800] | [400,800] ...

postgresql range
1个回答
0
投票
这是需要为每个表运行的DDL语句的示例:
© www.soinside.com 2019 - 2024. All rights reserved.