Обсуждение: Really simple question..

Поиск
Список
Период
Сортировка

Really simple question..

От
"Williams, Travis L, NPONS"
Дата:
Maybe I missed this somewhere.. but how do you drop a whole row or update a whole row with nulls easily?  I understand
howto do updates.. but I'd prefer not to have to do update table set col1 = null, col2 = null, col3 = null,........
col100= null where col1 = "25" or something.. 

Travis

Re: Really simple question..

От
Jean-Christian Imbeault
Дата:
Williams, Travis L, NPONS wrote:

Maybe I missed this somewhere.. but how do you drop a whole row

That one is easy:

delete from TABLE where col1=25;

or update a whole row with nulls easily?

Don't know that one. Would be interesting in knowing if there is a way.

The only way I can think of is to delete the row and then re-insert it,
but that depends on how the table is set up (i.e. does it allow NULL in
all fields?):

delete from TABLE where col1=25;
insert into TABLE(col1) values(25);

Just my 2 cents ...

Jc