reset serial column
Posted in 2000
Topics: General Discussion
Hi, Harry Sheng wrote: > > 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? No, the only method is the method you described above. Note, that the whole table will be copied, if you alter an integer to an serial field. Wile
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