Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2014
    Posts
    1

    Unanswered: what use of key in create table statement

    what use of key keyword (i.e. KEY `noti_type` (`noti_type`,`noti_trans`)) in create table statement in mysql db

    CREATE TABLE `fivestar`.`notfication` (
    `noti_code` integer NOT NULL ,
    `noti_description` varchar(60) NOT NULL DEFAULT '',
    `noti_date` date NOT NULL,
    `noti_type` int(19) NOT NULL DEFAULT '0',
    `noti_trans` int(19) NOT NULL DEFAULT '0',
    PRIMARY KEY (`noti_code`),
    KEY `noti_type` (`noti_type`,`noti_trans`)
    )ENGINE=MyISAM DEFAULT CHARSET=utf8;

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The KEY clause creates an index.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •