Change column value in Firebird

Asked

Viewed 515 times

0

I have a table with approximately 7 thousand records, I need to create a new column in this table but I would like all old records to have the value’S', when I try to create the column the fields are null even passing as default’S'. How can I make this change in my table ?

1 answer

3


Aós include your column, you can give a update in your table for cases where your field is null.

update tabela
set campo = 'S'
where campo is null
  • True, but for precaution I always do all my updates with Where, so it has become habit to put Where always.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.