Hi,

I like your opinion on the following sql improvement before I submit a JIRA 
request:

For domains it is possible to alter multiple changes in one statement.
For example:

CREATE DOMAIN MyDomain INTEGER DEFAULT 0 NOT NULL
ALTER DOMAIN MyDomain TO MyDomain2 TYPE BIGINT SET DEFAULT 1 NULL /* changes 
both name, type, default value and nullability */

For columns it is not possible to specify more than one change in the ALTER 
COLUMN clause.

For example, this is *not* allowed:

ALTER TABLE MyTable ADD MyColumn INTEGER DEFAULT 0 NOT NULL
ALTER TABLE MyTable ALTER COLUMN MyColumn TO MyColumn2 TYPE BIGINT SET DEFAULT 
1 NULL

In stead, you have to use:

ALTER TABLE MyTable ALTER COLUMN MyColumn To MyColumn2, ALTER COLUMN MyColumn2 
TYPE BIGINT, ALTER COLUMN MyColumn2 SET DEFAULT 1, ALTER COLUMN MyColumn2 NULL

or use separate statements (following pure SQL standard).

I like to propose to allow multiple changes in one ALTER COLUMN clause. This is 
more consistent with the ALTER DOMAIN syntax and more compact (readable).

What do you think?

Kind regards,
Robert
NL
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to