Subject | Re: [firebird-support] To add Primary Key |
---|---|
Author | Thomas Steinmaurer |
Post date | 2006-12-08T08:22:11Z |
Hi,
In your first example, the primary key constraint gets a system name,
which you need to lookup in the system tables, if, for instance, you
want to drop the primary key constraint.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
> What is the difference and which one is better?The latter, because you give the primary key constraint a meaningful name.
>
> Alter Table REF_STA add Primary Key (STA_CDE);
> Alter Table REF_STA add Constraint pk_REF_STA Primary Key (STA_CDE);
In your first example, the primary key constraint gets a system name,
which you need to lookup in the system tables, if, for instance, you
want to drop the primary key constraint.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com