创建表 - 将变量与字符串串联以命名新表格
我想创建一个表格,将前缀与给定标识符串联。每当我创建一个具有相同查询的新表时,前缀都会更改。
我尝试了以下想法的一些变体,但没有成功:
DEF prefix_edms = 'z_edm';
CREATE TABLE CONCAT(&prefix_edms,'_TABLE_A') as
(
SELECT 'HolaPoho' from dual
);
有什么办法可以在Oracle中做到这一点?
I want to create a tables concatenating a prefix with a given identifier. The prefix will change every time I create a new table with the same query.
I have tried a few variation of the following idea without success:
DEF prefix_edms = 'z_edm';
CREATE TABLE CONCAT(&prefix_edms,'_TABLE_A') as
(
SELECT 'HolaPoho' from dual
);
Is there any way I can do this in Oracle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因为它是sql*plus,然后你会
As it is SQL*Plus, you'd then