On 5-3-2016 22:28, Lester Caine wrote: > On 05/03/16 13:32, Dimitry Sibiryakov wrote: >> Currently parser enforce attribute clauses to have a definite positions >> in the >> statement. SQL standard doesn't require that. >> Do you agree that position-insensitive clauses would be more convenient? > > It would be nice if we did not have re-order scripts from other > databases so > NOT NULL DEFAULT '30' > has to be > DEFAULT '30' NOT NULL > in Firebird. > > I don't think that the SQL standard ever imposed an order on these? But > both MySQL and Postgresql seem to standardise on the DEFAULT last :(
The SQL standard specifies that the default clause follows the data type definition. And this is what Firebird does. The syntax in the SQL Standard is defined as: <column definition> ::= <column name> [ <data type or domain name> ] [ <default clause> | <identity column specification> | <generation clause> | <system time period start column specification> | <system time period end column specification> ] [ <column constraint definition>... ] [ <collate clause> ] ... <column constraint definition> ::= [ <constraint name definition> ] <column constraint> [ <constraint characteristics> ] <column constraint> ::= NOT NULL | <unique specification> | <references specification> | <check constraint definition> Mark -- Mark Rotteveel ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel