Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Language Elements : Data types : Array data types : Default value for ARRAY columns
 
Default value for ARRAY columns
When creating array columns, you can specify a default value.
Example
Since no value is specified for array column C2 when inserting values, the default value is used. The result returned from this example would be 10;10;10:
CREATE TABLE tbl (C1 int, C2 int ARRAY[3] default '10');
INSERT INTO tbl (C1) VALUES (1);
SELECT C2 FROM tble WHERE C1 = 1;
Note: The default value is applicable only at the column level. This means that if fewer values are specified when executing an insert statement, the default will not be used to fill up the rest of the array elements. Instead, NULL is used.