简体   繁体   English

Redshift 截断表并重置身份?

[英]Redshift Truncate table and reset Identity?

I know in PostgresQL there is我知道在 PostgresQL 中有

truncate table restart identity;

but this doesn't work in Redshift.但这在 Redshift 中不起作用。 Is there something else to do this in Redshift?在 Redshift 中还有其他事情可以做到这一点吗? Otherwise I see it lot of pain to drop table and recreate and load.否则,我认为删除表并重新创建和加载会很痛苦。

Its not possible to reseed identity value in redshift like other sql databases.不可能像其他 sql 数据库一样在 redshift 中重新设定身份值。 you have to create new table and move data there.您必须创建新表并将数据移动到那里。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM