英文:
How i can create a table using AS and specify the tablespace in db2?
问题
我试图使用"AS"创建一个表并指定表空间。
我尝试了类似以下的语句:
db2 "CREATE TABLE schema.table AS (SELECT * FROM schema.tmp) IN TABSPACE01 WITH NO DATA"
但我遇到了错误,是否可以在使用"AS"创建表时指定表空间?
英文:
I'm trying to create a table using "AS" and specify the tablespace.
I tried something like:
db2 "CREATE TABLE schema.table AS (SELECT * FROM schema.tmp) IN TABSPACE01 WITH NO DATA"
But i get a error, it's possible to specify the tablespace when creating a table with "AS"?
答案1
得分: 2
"When using a result set to create a table WITH NO DATA
should follow immediately after the fullselect."
db2 "CREATE TABLE schema.table AS (SELECT * FROM schema.tmp) WITH NO DATA IN TABSPACE01"
英文:
When using a result set to create a table WITH NO DATA
should follow immediately after the fullselect.
db2 "CREATE TABLE schema.table AS (SELECT * FROM schema.tmp) WITH NO DATA IN TABSPACE01"
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论