Creating trigger throws error in embedded derby
----------------------------------------------- Key: DERBY-4404
URL: Project: Derby Issue Type: Bug Components: SQL Affects
Versions: Environment: Ubuntu 8.04 (GNU/Linux), IcedTea6
Reporter: A Hunt Trying to create a trigger throws an error on
embedded Derby, the same trigger can be created fine using ij.
When trying to create the trigger, the error thrown states:
Syntax error: Encountered "NEW" at line 1, column 69. The
trigger statement used: CREATE TRIGGER trig_dGroup1 AFTER INSERT
ON groups REFERENCING NEW AS mod FOR EACH ROW MODE DB2SQL UPDATE
groups SET isDefault = 0 WHERE (isDefault = 1) AND ((NOT (id =
AND (mod.isDefault = 1)) I have created the database beforehand
and set up the table groups using: connect
'jdbc:derby:MyDbTest;create=true'; (con =
DriverManager.getConnection(connectionURL) for the embedded
program) Then I run the statement: CREATE TABLE groups ( id INT
NOT NULL GENERATED ALWAYS AS IDENTITY CONSTRAINT WISH_PK PRIMARY
KEY, name VARCHAR(32