Answer the question
In order to leave comments, you need to log in
How to clear a postgresql table column?
Is there an analogue of the truncate table command to clear a specific column/column in a table?
Answer the question
In order to leave comments, you need to log in
What does "clear column" mean? Removing all values in it?
Removing a column from a table?ALTER TABLE "table" DROP COLUMN "column"
How do you imagine that? truncate throws out files and allocates empty ones. And for the column? This is not a columnar DBMS.
You can do this:
begin;
alter table tablename drop column foo;
alter table tablename add column foo ...
commit;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question