>Can be done in two steps, but not in one:
>
>insert into deleted_users select * from active_where where username='joe';
>delete form active_users where username='joe';
>
>what you mention about usernames not being unique in the deleted_users
>table is
>not a problem as long as you don't have a primary or unique key on
>username.. but
>you should make some primary key in the delete_users table, an auto_increment
>or something for maintenance purposes.

Right, there is an auto_increment column in the active_users, which will
get carried over into the deleted_users table. Since each entry in the
active_user will be auto_incremented, all of the rows in the deleted_users
will have a unique identifer as well.

At any rate, I guess two steps are better than three. Thanks for the help.




=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Aaron Williams   [EMAIL PROTECTED]
Dev. Engineering  StarNet Incorporated
WholeSale Dial-Up    www.megapop.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



---------------------------------------------------------------------
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

Reply via email to