In a Firebird database, I need to create a DOMAIN
with default value taken from the context variable.
It should be something like
CREATE DOMAIN USER_ID AS INTEGER
DEFAULT RDB$GET_CONTEXT('USER_SESSION','UID') NOT NULL;
When I execute this, I am getting the following error
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 2, column 13.
RDB$GET_CONTEXT.
How can this be done, maybe there is another way than the DEFAULT
clause?