DEFAULT 0 NOT NULL in 3rd party clients causes syntax error

Details

Detail name Value
Changelog Number 4964
Type Bug
Status Resolved
Affected Versions EXASOL 6.0.0, EXASOL 6.0.1, EXASOL 6.0.2
Fix Versions EXASOL 6.0.3
Resolution Date 2017-08-22

Using of DEFAULT in combination with NOT NULL at the end of an SQL statements leads to a syntax error in EXASOL.
It only occurs in 3rd party Clients, it works in EXAplus.

Reproducibility:

CREATE SCHEMA TEST
CREATE TABLE TEST.T(A INT)
ALTER TABLE TEST.T ADD B VARCHAR(100) DEFAULT 0 NOT NULL

Error:

[42000] syntax error, unexpected NULL_

Workaround:
Set the properties in two different SQL statements.

ALTER TABLE TEST.T ADD COLUMN B VARCHAR(100) NOT NULL
ALTER TABLE TEST.T ALTER COLUMN B SET DEFAULT 0

How to identify:
Using DEFAULT and NOT NULL on a SQL statement leads to the error
"syntax error, unexpected NULL_".