使用临时桌子而无需未来的赠款

发布于 2025-01-24 21:36:02 字数 745 浏览 5 评论 0原文

我想摆脱团队榜单,而不必在我的架构上发布未来的赠款。架构“ DB_DEV.Schema”是“带有托管访问”模式的“”。 但是我没有成功。 这是我的测试的代码。

情况1

create or replace temporary table DB_DEV.Schema.TempTable as select cast(null as date) Col1 ,cast(null as date) as Col2 from Dual ;

select * from DB_DEV.Schema.TempTable ;

--SQL compilation error: Object 'DB_DEV.Schema."TempTable"' does not exist or not authorized.

案例2

grant SELECT,INSERT,UPDATE,DELETE,TRUNCATE  ON future TABLES  IN SCHEMA DB_DEV.Schema  to  ROLE My_User_Role ;

create or replace temporary table DB_DEV.Schema.TempTable as select cast(null as date) Col1 ,cast(null as date) as Col2 from Dual ;

select * from DB_DEV.Schema.TempTable ;

--it works

我错过了什么或做错了什么?

I would like to get rid of Teamporary tables without having to issue FUTURE GRANT on my schema. The schema "DB_DEV.Schema" is a "WITH MANAGED ACCESS" schema.
But I do not succeed.
Here is the code of my tests.

Case 1

create or replace temporary table DB_DEV.Schema.TempTable as select cast(null as date) Col1 ,cast(null as date) as Col2 from Dual ;

select * from DB_DEV.Schema.TempTable ;

--SQL compilation error: Object 'DB_DEV.Schema."TempTable"' does not exist or not authorized.

Case 2

grant SELECT,INSERT,UPDATE,DELETE,TRUNCATE  ON future TABLES  IN SCHEMA DB_DEV.Schema  to  ROLE My_User_Role ;

create or replace temporary table DB_DEV.Schema.TempTable as select cast(null as date) Col1 ,cast(null as date) as Col2 from Dual ;

select * from DB_DEV.Schema.TempTable ;

--it works

Did I miss something or do something wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文