Subject | Indexe's on Keys |
---|---|
Author | Uwe Oeder |
Post date | 2004-03-17T11:53:49Z |
As far as I know everytime I create a table with a primary key or a foreign
key automatically an idnex is created for them. Now I read somewhere , I
don't remember where , either in the forum or in one of the many Firebird
builds documentation that I can define this index creation or at least the
name that the index gets. How do I do that given the table examle below ?
Or must I create the table and then rename the index. Or where can I find
documentation about this ?
CREATE TABLE Country
(
CountryIDSQ INTEGER NOT NULL ,
CountryName VARCHAR(50) NOT NULL ,
CountryInternationlCode VARCHAR(10) DEFAULT '00' NOT NULL ,
CountryCode VARCHAR(10) NOT NULL ,
CountryAreaCode VARCHAR(10) ,
CountryTimeZoneDifference VARCHAR(20) ,
CountryHelpNumber VARCHAR(8) ,
PRIMARY KEY (CountryIDSQ) ,
UNIQUE (CountryName)
) ;
key automatically an idnex is created for them. Now I read somewhere , I
don't remember where , either in the forum or in one of the many Firebird
builds documentation that I can define this index creation or at least the
name that the index gets. How do I do that given the table examle below ?
Or must I create the table and then rename the index. Or where can I find
documentation about this ?
CREATE TABLE Country
(
CountryIDSQ INTEGER NOT NULL ,
CountryName VARCHAR(50) NOT NULL ,
CountryInternationlCode VARCHAR(10) DEFAULT '00' NOT NULL ,
CountryCode VARCHAR(10) NOT NULL ,
CountryAreaCode VARCHAR(10) ,
CountryTimeZoneDifference VARCHAR(20) ,
CountryHelpNumber VARCHAR(8) ,
PRIMARY KEY (CountryIDSQ) ,
UNIQUE (CountryName)
) ;