Subject Re: [firebird-support] Re: Cannot create tables in new FB 2.5 DB, fails with error 335544351 on commit
Author Michael Ludwig
Helen Borrie schrieb am 01.01.2011 um 08:09 (+1300):
> >
> >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.

And I used to think I know messiness when I see some. If you don't
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:
>
> 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;

How and why are these forms less messy?

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