Thread: new serial type
Is there some function to change the serial type to, instead of reading a next-value, read the maxium value in a column and then add x? If, for some reason, the sequence is not updated (when I'm doing COPY into a table), I'll have to recreate the sequence. Instead, it would be much more simple just to take the max()+x value for a new type of serial type. /Rolf
Den l�rdag 13. januar 2001 11:42 skrev Rolf Johansson: > Is there some function to change the serial type to, instead of reading > a next-value, read the maxium value in a column and then add x? If, for You can use setval(sequence, number) and MAX(number) in combination. -- Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582 Kaki Data tshirts, merchandize Fax: 3816 2501 Howitzvej 75 �ben 14.00-18.00 Email: kar@webline.dk 2000 Frederiksberg L�rdag 11.00-17.00 Web: www.suse.dk