How to write triggers?
Posted: Mon Jan 28, 2002 6:03 pm
$db and $table may be used in the create trigger statement and will be replaced with the names of the database and temp table respectively when triggermode is 1. See triggermode http://www.thunderstone.com/site/texisman/node154.html
So your trigger action might be, as above:
... shell '/path/to/script $db $table'
The file /path/to/script might contain
#!/bin/sh
/usr/local/morph3/bin/tsql -q -d "$1" "delete from orders where PID in (select PID from $2)"
So your trigger action might be, as above:
... shell '/path/to/script $db $table'
The file /path/to/script might contain
#!/bin/sh
/usr/local/morph3/bin/tsql -q -d "$1" "delete from orders where PID in (select PID from $2)"