Back to the month index |
Back to the list index
|
Quy Le (quy@blackjack.corp.sgi.com)
Sat, 04 Jan 1997 00:33:55 -0800
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Egon Vellusig: "Re: [mSQL] List Etiquette"
- Previous message: D.J. Gregor: "Re: [mSQL] unique fields under msql2"
- In reply to: Ryan Scott: "[mSQL] unique fields under msql2"
- Next in thread: Miten S Mehta: "Re: [mSQL] unique fields under msql2"
- Reply: Miten S Mehta: "Re: [mSQL] unique fields under msql2"
Message-Id: <32CE15F3.41C6@blackjack.corp.sgi.com> Date: Sat, 04 Jan 1997 00:33:55 -0800 From: Quy Le <quy@blackjack.corp.sgi.com> Subject: Re: [mSQL] unique fields under msql2Hey Ryan,
I think one of the differences now with msql2 is that the primary key
clause in invalid. You have to create a unique index so in your case,
you would issue the following SQL:
create unique index <index_name> on <table_name> (<column_name>)
so, in your case, you could do (assuming your table name is "users"):
create unique index users_index1 on users (username)
Hope this helps...
Quy
Ryan Scott wrote:
>
> I cannot for the life of me figure out how with msql2 I'm supposed to
> specify that a field is the primary index, as in it should be unique.
>
> With msql 1, I could just say
>
> username char(40) primary key,
>
> but msql 2 did not like this.
>
> How do I force msql to make username remain unique? I do not want
> duplicate usernames...
>
> I can't find this information anywhere. Anyone?
>
> ______________________________________________________________________
> Ryan Scott - rscott@netcreations.com - 718 522 1531
> - Reinventing Direct Marketing on the Net -
> NetCreations, Inc - http://www.netcreations.com
> - Targeted Voluntary Email -
> PostMaster Direct Response - http://www.netcreations.com/postdirect/
> *be sure to quote me in your reply*
> --------------------------------------------------------------------------
> To remove yourself from the Mini SQL mailing list send a message containing
> "unsubscribe" to > "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
> "info msql-list" to majordomo@bunyip.com for info on monthly archives of
> the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
-- ======================================================================= Quy Le Office : (415) 933-6801 Worldwide Field I/S Fax : (415) 933-0135 Silicon Graphics E-mail : quy@corp.sgi.com http://reality.sgi.com/quy ======================================================================= -------------------------------------------------------------------------- To remove yourself from the Mini SQL mailing list send a message containing "unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing "info msql-list" to majordomo@bunyip.com for info on monthly archives of the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Egon Vellusig: "Re: [mSQL] List Etiquette"
- Previous message: D.J. Gregor: "Re: [mSQL] unique fields under msql2"
- In reply to: Ryan Scott: "[mSQL] unique fields under msql2"
- Next in thread: Miten S Mehta: "Re: [mSQL] unique fields under msql2"
- Reply: Miten S Mehta: "Re: [mSQL] unique fields under msql2"