alter serial
Posted in 2005
Topics: Stored Procedures & SPL
Hello.
On Informix dynamic server 7.31 TD2 I have two problems:
1. have to alter serial sequence to a smaller value after this:
...
delete max(serial_column) from some_table;
alter somehow serial sequence to value that was just deleted
Docs tells me that I can do it this by inserting zero in that column first and
then alter table some_table (column serial(new_value_for_counter))
--- this doesn t work at all
The only thing that I can do is alter column to integer (all constraints and
references must be rebuilt ) and then alter it back to proper serial.
Is there any way to alter serial?
2. in a stored procedure have this construct
...
alter table some_table modify (serial_column serial(_VARIABLE_))
it seems informix doesn't like to have _VARIABLE_ and wants only value.
It is really not allowed to put variable there?
Informix has such thing as substitution then?
Thank you.