Example: WITH DEFAULT Phrase
If the EdLev column is defined as:
EdLev BYTEINT FORMAT 'Z9' NOT NULL WITH DEFAULT,
then the column definition for EdLev is stored as:
EdLev BYTEINT NOT NULL DEFAULT 0 FORMAT 'Z9',
Example: Inserting a Row Using a Default Value
The following INSERT statement adds a row containing a zero in the EdLev field defined in the previous example:
INSERT INTO Employee (Name, EmpNo, DeptNo, DOB, Gender, EdLev) VALUES ('Newhire A', 10025, 700, '49/10/17', 'M',) ;
Example: TIME Column with a Default of the Current Time
The following example shows a TIME column specified with a default of the current time:
Stage TIME(3) WITH DEFAULT
Example: INTERVAL Column with a Default Interval
The following example shows an INTERVAL column specified with a default interval:
Scale INTERVAL HOUR(2) WITH DEFAULT