“truncate psql” Respostas de código

Reinicie a cascata de identidade

TRUNCATE <table_name> RESTART IDENTITY CASCADE;
--RESTART will reset the identity sequence
--CASCADE all tables that have a foreign key reference to 
--table_name will be truncated as well
The Nihad

Tabela truncada Postgres

truncate my_table restart identity
Unsightly Unicorn

truncate psql

TRUNCATE [ TABLE ] [ ONLY ] name [ * ] [, ... ]
    [ RESTART IDENTITY | CONTINUE IDENTITY ] [ CASCADE | RESTRICT ]
Colorful Centipede

Respostas semelhantes a “truncate psql”

Perguntas semelhantes a “truncate psql”

Procure respostas de código populares por idioma

Procurar outros idiomas de código