Subject | Re: [firebird-support] Re: Cannot create tables in new FB 2.5 DB, fails with error 335544351 on commit |
---|---|
Author | Michael Ludwig |
Post date | 2011-01-03T00:39:04Z |
Helen Borrie schrieb am 01.01.2011 um 08:09 (+1300):
mind my asking, what exactly is *messy* about the above DDL snipped?
The constraint name is included, so it looks orderly to me.
I'm seeing all of these forms in the wild and now I'm suspecting
to be unaware of some possibly subtle but important difference.
Happy New Year to all!
--
Michael Ludwig
> >And I used to think I know messiness when I see some. If you don't
> >CREATE TABLE HL_Oids (
> > OID OidKey NOT NULL CONSTRAINT PK_OIDs PRIMARY KEY
> >);
> Nevertheless, I don't consider this a tidy way to do table DDL.
> You save a couple of keystrokes and have a messy DDL script.
mind my asking, what exactly is *messy* about the above DDL snipped?
The constraint name is included, so it looks orderly to me.
> I prefer:How and why are these forms less messy?
>
> create table HL_Oids (
> OID OidKey NOT NULL,
> <other columns>,
> constraint PK_OIDS PRIMARY KEY(OID)
> );
> commit;
>
> Some people prefer:
> create table HL_Oids (
> OID OidKey NOT NULL,
> <other columns>);
> commit;
> alter table HL_Oids
> add constraint PK_OIDS PRIMARY KEY(OID);
> commit;
I'm seeing all of these forms in the wild and now I'm suspecting
to be unaware of some possibly subtle but important difference.
Happy New Year to all!
--
Michael Ludwig