Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases > #436

Re: Q: is INDEX synonymous with KEY in SQL92?

From Lennart Jonsson <erik.lennart.jonsson@gmail.com>
Newsgroups comp.databases
Subject Re: Q: is INDEX synonymous with KEY in SQL92?
Date 2013-09-30 14:55 +0200
Organization A noiseless patient Spider
Message-ID <l2bsbm$u0m$1@dont-email.me> (permalink)
References <df5d7bcf-bc7d-493c-ba32-74e5621daed2@googlegroups.com>

Show all headers | View raw


On 09/28/2013 01:54 AM, jmichae3@yahoo.com wrote:
> for the syntax 
> CREATE TABLE t (
> abc VARCHAR(200) NOT NULL DEFAULT '' UNIQUE INDEX
> )
> I understand you can have the syntax UNIQUE INDEX or UNIQUE KEY in mysql.
> question is, (I just want to verify correctness) whether INDEX and KEY are synonymous here, or whether KEY refers to a FOREIGN KEY or PRIMARY KEY that I might create.
> I am not asking someone to actually try this code, I can tell you this does not work in mysql, but it is in the documentation.
> 
> I am just trying to clarify my understanding of the definition of "KEY" with regards to UNIQUE KEY.
> maybe they do mean the same thing?
> thanks.
> 

MySQL treats KEY and INDEX as synonyms which is somewhat confusing. I
haven’t found any references to INDEX in SQL92 (nor later versions). It
is my impression that indexes is left as an exercise for the implementer
of a DBMS.

You can find a list of reserved words at:

http://developer.mimer.se/standard/reservedwords/sql-reserved-words.tml

There is also a validator for SQL92, SQL99 and SQL2003 at:

http://developer.mimer.se/validator/index.htm


Draft documents of various SQL standards can be found at:

http://www.wiscorp.com/SQLStandards.html

Back to comp.databases | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Q: is INDEX synonymous with KEY in SQL92? jmichae3@yahoo.com - 2013-09-27 16:54 -0700
  Re: Q: is INDEX synonymous with KEY in SQL92? Lennart Jonsson <erik.lennart.jonsson@gmail.com> - 2013-09-30 14:55 +0200
  Re: Q: is INDEX synonymous with KEY in SQL92? Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2013-09-30 16:03 +0200
  Re: Q: is INDEX synonymous with KEY in SQL92? Norbert_Paul <norbertpauls_spambin@yahoo.com> - 2013-10-03 11:16 +0200
    Re: Q: is INDEX synonymous with KEY in SQL92? Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2013-10-03 12:05 +0200
      Re: Q: is INDEX synonymous with KEY in SQL92? Norbert_Paul <norbertpauls_spambin@yahoo.com> - 2013-10-03 13:48 +0200
        Re: Q: is INDEX synonymous with KEY in SQL92? Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2013-10-03 15:51 +0200

csiph-web