I think you want UNIQUE.

create table sometable (
        somecolumn char(40),
        someothercolum int,
        unique somecolumn
)

...something like that. I haven't messed with it much.

-Steve

On Thursday, October 25, 2001, at 04:31  PM, Jeff Gannaway wrote:

> Does anyone know how to set a column in a MySQL table to disallow any
> duplicate entries.
>
> I've already got a PRIMARY KEY defined for this table.  I tried setting 
> the
> other field to a MUL KEY, hoping that it would not permit duplicates, 
> but
> it does.
>
> I've searched the MySQL docs without success. I wish their site was a 
> good
> as PHP.net.
>
> Later,
> Jeff Ganaway
> ___________________________________________________________
>
> Save 15% on 2002 Calendars and Holiday Cards!
>
> http://www.AvantGifts.com
> Discount Code: hopper22ct
> Offer Good Through October 31, 2001
> ___________________________________________________________
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to