Re: reset serial column
Posted in 2000
This is just a cut/paste from the manual to help you. "Altering the Next Serial Number You can use the MODIFY clause to reset the next value of a SERIAL column. You cannot set the next value below the current maximum value in the column because that action can cause the database server to generate duplicate numbers. However, you can set the next value to any value higher than the current maximum, which creates gaps in the sequence." By the way you would find this in "ALTER TABLE clause " in SQL syntax guide. Vivek Chaudhary ______________________________ Reply Separator _________________________________ Subject: reset serial column Author: hsheng (hsheng@crosskeys.com) at internet Date: 5/11/00 9:28 AM Hello, The doc tells me that I can use "alter table " statement to reset a serial column. But I could not find a one statement method to reset the serial column even if I have no records in the table. I have to change the serial column to another type (I use int) first, then change it back to serial. Is there an one SQL statement method to reset a serial column? Harry