Re: SQL Query - Alter table for default values.
Posted in 2000
Carlos Benjamin — — source: Informix-list mailing list archive (1991-1998)
Stephens, Alan <alans@credo.ie> wrote:
>
>Informix Dynamic Server 7.2 on solaris
>
>What is the sql syntax for changing the default value on an existing
>field in a table.
>
>e..g in table x field z was given a default of ' ' (blank space) on
>creation
>but now want to alter the table so it has a default of '0'
alter table x modify (z [int, char, etc] default 0 not null)
>Are there any caveats with doing this ?
You have to update all of your nulls to zero values first.
>
>TIA,
>a.
>
carlos
Currently on hiatus from unemployment.
----------------------
Do you do Linux? :)
Get your FREE @linuxstart.com email address at: http://www.linuxstart.com