Chapter 3 DBMS Reference Guide


Common entries for Trigger

You can define values for the following common entries for the Trigger object in the DBMS definition.

Entry Example (Sybase Adaptive Server Anywhere 6)
Enable Enable = Yes
Maxlen MaxLen = 30
Drop
if exists(select 1 from sys.systrigger where trigger_name = '%TRIGGER%') then
drop trigger %TRIGGER%
end if
Create
create trigger %TRIGGER%[%TRGTIME%=before? no cascade][ %TRGTIME%][ %TRGEVENT%[ of %COLUMNS%]] on [%QUALIFIER%]%TABLE%
%TRGDEFN%
SqlListQuery
{OWNER, TABLE, TRIGGER, TRGEVENT (C=Update, D=Delete, *=Insert), TRGTIME (A=After, *=Before)}
SELECT U.USER_NAME, T.TABLE_NAME, R.TRIGGER_NAME, R.EVENT, R.TRIGGER_TIME
FROM SYSUSERPERMS U,SYSTABLE T,SYSTRIGGER R
WHERE [%SCHEMA% ? U.USER_NAME='%SCHEMA%' AND]
R.TRIGGER_NAME IS NOT NULL AND
T.CREATOR=U.USER_ID AND R.TABLE_ID = T.TABLE_ID
ORDER BY U.USER_NAME, T.TABLE_NAME
SqlAttrQuery
{OWNER, TABLE, TRIGGER, SCRIPT}
SELECT U.USER_NAME, T.TABLE_NAME, R.TRIGGER_NAME, R.TRIGGER_DEFN 
FROM SYSUSERPERMS U,SYSTABLE T,SYSTRIGGER R 
WHERE [%OWNER% ? U.USER_NAME='%OWNER%' AND] [%TABLE% ? T.TABLE_NAME='%TABLE%' AND]
T.CREATOR=U.USER_ID AND R.TABLE_ID = T.TABLE_ID
ORDER BY U.USER_NAME, T.TABLE_NAME
ModifiableAttributes List of extended attributes that will be taken into account in the merge dialog box during database synchronization
ReversedStatements List of statements that will be reverse engineered

For a description of each of the common object entries, see section "Common object entries".

 


Copyright (C) 2005. Sybase Inc. All rights reserved.