N
N
newbie_python2021-09-28 09:48:31
PostgreSQL
newbie_python, 2021-09-28 09:48:31

How to clear postgresql table field by condition?

Good afternoon! Tell me, is it possible to clear a table field by condition? That is, you need to clear the field of the table, where the record ID = 1, for example. Will the following query be correct?
UPDATE "table" SET "column" = null WHERE id = 1;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Kokoulin, 2021-09-28
@newbie_python

So try it, if you have nowhere to raise the server in order to check, use
https://www.db-fiddle.com/
But in general, yes, this design will work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question