Reset values in serial datatype
Posted in 1995
I thought I had read in here a discussion about resetting the starting values of a serial datatyped column. I just got finished looking through the indexes of this newsgroup at mathcs.emory.edu and found nothing. So here's the problem: I have a couple of tables with serial datatypes in them. Currently we're loading and purging the data in these tables as we train new users on the applications. We're not concerned with the serial values 'cause it's just test data. We're now to the point where we need to roll the application out to the 140 sites that will use it and have all the sites train then go to production mode. When we go to production mode, the serial number values need to be set back to zero adn increment from there. Normally I'd either alter the column to int then back to serial or just drop the column then recreate. In this case I have a significant number of tables that refer to these columns via foreign keys and when I alter the datatype all the constraints go south. Is there a way of resetting the value of a serial datatype back to 0?? Thanks for any help. -- Carlton Doe "It's not *over* until I win!" DBA Resources, Inc. -- Les Brown Salt Lake City, UT carlton@errin.dbaresrc.com http://xmission.com/~dbaresrc