"Nguyen, David M" wrote:
> 
> I create a table to store user account information and set "userid" column
> to be primary key.  I now want to set "username" to be primary key instead
> of "userid", how do I change it?  There are couple hundreds of records in
> table.  Please advise.
> 
> Thanks,
> David

David,

   Are you sure that you want username to be primary key, instead of
unique (and possibly not null) ? IMHO a userid is a better potential PK
than a username. If you already have tables referencing this one, it
would be better to create a unique constraint on username - BTW you can
define a FK on a unique constraint.
-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to