Wilt, Charles wrote:
<<SNIP>>
/* Create table. v6r1 */
CREATE TABLE to-file LIKE from-file
RCDFMT rcdfmt-name ;

ALTER TABLE to-file ADD COLUMN H3_CREATED_BY FOR COLUMN H3CRTUSER VARCHAR(18) NOT NULL IMPLICITLY HIDDEN DEFAULT USER;

ALTER TABLE to-file ADD COLUMN H3_CREATED_TIMESTAMP FOR COLUMN H3CRTTIMST TIMESTAMP NOT NULL IMPLICITLY HIDDEN DEFAULT CURRENT_TIMESTAMP;

<<SNIP>>

I assume there is no requirement to add the two fields separately; i.e. that there is no restriction with IMPLICITLY HIDDEN on ADD COLUMN?

If not, then FWiW, like for any ALTER, the best approach is to combine the maximum amount of alter activity into one request. Two ALTER requests is a very poor choice when data exists, since the data will be copied for each request. Of course the example was with an empty table, so there is no data movement to be concerned with.

Regards, Chuck




Return to Archive home page | Return to MIDRANGE.COM home page