【发布时间】:2019-06-11 06:34:11
【问题描述】:
我想运行在 Redshift 表中存储为 varchar 的 SQL 查询。有没有办法达到同样的效果?这就是我想要的:
--if we have a text script like this
insert into schema_1.table_1 (id, script) values (1, 'select count(*) from
schema_2.table_2;');
--is there any way to run this script in SQL?
RunString(select script from schema_1.table_1 where id = 1);
表格如下所示:
___________________________________________
|Id|Query |
|--|--------------------------------------|
|1 |select count(*) from schema_2.table_2;|
-------------------------------------------
简而言之,我想运行上表中的查询。
【问题讨论】:
标签: sql amazon-web-services amazon-redshift