Thanks for all comments & suggestion.
My Point :
If we have trigger creation on per table basis then why can't we have dropping
also on table basis.
It is not good to have feature where each table owner are free to allow the way
he want to create trigger.
I can't quite decipher what you mean - sorry. Are you wanting to block certain table owners from creating some sorts of triggers?
In SQLite the "Table-owner" has no significant meaning. If you want to do any such blocking it will have to be in your code, which
can then be extended to simply check if triggers exist or to allow/disallow them.
Or maybe you mean something different?
Either way, just to cover all bases, here's some basic SQL to check triggers in SQlite - I'm sure you know this already, but just to
be sure there are no misconceptions:
Find all Triggers in Database:
SELECT name FROM sqlite_master WHERE type="trigger"
Find the Triggers for any specific Table:
SELECT name FROM sqlite_master WHERE type="trigger" AND tbl_name="xxxTable"
Find which Table a Trigger belongs to:
SELECT table FROM sqlite_master WHERE type="trigger" AND name="xxxTrigger"
Find if a specific Trigger exists
SELECT Count() FROM sqlite_master WHERE type="trigger" AND name="xxxTrigger"
You can easliy expand these to check for temp triggers or triggers in other
attached database files etc.
(Where anything with xxx in it obviously means your own name for that thing...)
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users