Brian, Monday, August 19, 2002, 11:48:16 PM, you wrote: BJ> I have a SQL statement to create a PostgreSQL table that include a line 'id serial' BJ> This line creates a integer field with a sequence atached to it to create an autonumber
In MySQL you can use AUTO_INCREMENT: http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html BJ> Is there a way to create a SQL statement to accomplish this that would work with BJ> both MySQL and PostgreSQL I don't know PostgreSQL, but you can retrieve maximum value with MAX() function and and then insert MAX()+1 value. Don't forget to lock table. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php