: I've got a database already populated with data and need to add a : sequential numerical "id" field as a key. (as one would with an auto : increment field) : : Is there a straightforward sql statement that will do this?
ALTER TABLE t_name ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY; -- Sherzod Ruzmetov <[EMAIL PROTECTED]> http://www.UltraCgis.com, Consultant 989.774.6265 01001010010000010101000001001100 +----------------------------------------+ | There is nothing wrong with your tools.| | But we can make a better one. | +----------------------------------------+ --------------------------------------------------------------------- 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