Re: newbie - autoincrement data type
Posted in 1997
Hello ! Yes there is a way to make this work. Simply declare the field to be of type SERIAL. Whenever you insert a new record the field ID will increment itself. If you think SERIAL fields restrict your work, use a database trigger to automatically increment this field when a insert is performed. Hope this helps Chaminda Peries On Mon, 10 Feb 1997, Paul Huard wrote: } Hi, } } There doesn't appear to be a FAQ and the Informix documentation doesn't } mention it, but I'm hoping there is some type of field that automatically } increments itself, something like.... } } create table mytable } ( } ID integer not null, autoincrement??? } last_name varchar(50,0) not null } ); } } } Any help would be much appreciated, } } Paul } } }