Subject | Re: [firebird-support] How to change Index Key Name of Primary Key |
---|---|
Author | AccPro Computer Systems Pte Ltd |
Post date | 2004-01-25T06:12:14Z |
Hi Helen,
Thanks. Actually, I am importing the Firebrid 1.5 data structure into Clarion for Windows development tools from www.softvelocity.com .
Kelvin Chua
SINGAPORE
Thanks. Actually, I am importing the Firebrid 1.5 data structure into Clarion for Windows development tools from www.softvelocity.com .
Kelvin Chua
SINGAPORE
----- Original Message -----
From: Helen Borrie
To: firebird-support@yahoogroups.com
Sent: Saturday, January 24, 2004 9:17 PM
Subject: Re: [firebird-support] How to change Index Key Name of Primary Key
At 07:29 PM 24/01/2004 +0800, you wrote:
>Hi there,
>
>I have the following script:
>
>
>CREATE TABLE "AADDRESS" (
> "CUSTOMER_ID" VARCHAR(10) CHARACTER SET ISO8859_1 NOT NULL ,
> "COUNTER" CHAR(5) CHARACTER SET ISO8859_1 NOT NULL PRIMARY KEY ,
> "ADDRESS_ID" VARCHAR(15) CHARACTER SET ISO8859_1 NOT NULL ,
> "ADDRESS_LINE1" VARCHAR(40) CHARACTER SET ISO8859_1 ,
> "ADDRESS_LINE2" VARCHAR(40) CHARACTER SET ISO8859_1 ,
> "ADDRESS_LINE3" VARCHAR(40) CHARACTER SET ISO8859_1 ,
> "ADDRESS_LINE4" VARCHAR(40) CHARACTER SET ISO8859_1 ,
> "ADDRESS_LINE5" VARCHAR(40) CHARACTER SET ISO8859_1 ,
> "APPROVEDBY" VARCHAR(10) CHARACTER SET ISO8859_1 ,
> "LOCKED" INTEGER NOT NULL ,
> "ROLLEDOVER" INTEGER NOT NULL
>)
>
>Instead of having PRIMARYKEY as the Index Key Name , how should to change
>the script to change the default name of the Primary Key?
You can't change the name of the PK, but if you want it to have a custom
name, use the Named Constraint syntax:
CREATE TABLE "AADDRESS" (
"CUSTOMER_ID" VARCHAR(10) CHARACTER SET ISO8859_1 NOT NULL ,
"COUNTER" CHAR(5) CHARACTER SET ISO8859_1 NOT NULL ,
"ADDRESS_ID" VARCHAR(15) CHARACTER SET ISO8859_1 NOT NULL ,
"ADDRESS_LINE1" VARCHAR(40) CHARACTER SET ISO8859_1 ,
"ADDRESS_LINE2" VARCHAR(40) CHARACTER SET ISO8859_1 ,
"ADDRESS_LINE3" VARCHAR(40) CHARACTER SET ISO8859_1 ,
"ADDRESS_LINE4" VARCHAR(40) CHARACTER SET ISO8859_1 ,
"ADDRESS_LINE5" VARCHAR(40) CHARACTER SET ISO8859_1 ,
"APPROVEDBY" VARCHAR(10) CHARACTER SET ISO8859_1 ,
"LOCKED" INTEGER NOT NULL ,
"ROLLEDOVER" INTEGER NOT NULL,
CONSTRAINT PK_AADDRESS PRIMARY KEY(COUNTER)
);
1.5 will name the index the same as the constraint but you can define
custom names for the PK, UK and FK indexes and make them DESC if you want
to. See Release notes...
I'm puzzled about "Instead of having PRIMARYKEY as the Index Key
Name..". Isn't it named RDB$PRIMARYnn (nn being a number)?
/heLen
Yahoo! Groups Sponsor
ADVERTISEMENT
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
b.. To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--- [This E-mail was scanned for viruses.]
[Non-text portions of this message have been removed]