Preparing query: CREATE TRIGGER autoincrementor_id FOR ID
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.OID IS NULL) THEN
NEW.OID = GEN_ID(MY_GEN_ID,1)
Error: *** IBPP::SQLException ***
Context: Statement::Prepare( CREATE TRIGGER autoincrementor_id FOR ID
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.OID IS NULL) THEN
NEW.OID = GEN_ID(MY_GEN_ID,1) )
Message: isc_dsql_prepare failed
SQL Message : -104
Invalid token
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Unexpected end of command - line 6, column 33
在下面创建触发器时出现此错误:
CREATE TRIGGER autoincrementor_id FOR ID
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.OID IS NULL) THEN
NEW.OID = GEN_ID(MY_GEN_ID,1);
END
我在哪里失踪?我已经ID
使用主 id 创建了我的表oid
,该表必须自动递增。我还创建了我的生成器函数MY_GEN_ID
。