Hi Joe,

You've got the right idea. Just make use of sqlite_master.tbl_name.

  select sql || ';' from sqlite_master
    where type = 'trigger' and tbl_name = 'MyView';

sqlite_master.name is the name of the table/view/index/trigger itself,
and sqlite_master.tbl_name is what it acts on.

I think that's mostly right. tbl_name "is what it acts on" for an index and trigger, but not for a view. Unfortunately, for a view, tbl_name is just the name of the view, not the table (or view) that it acts on. That's partly understandable since a view could act on more than one table.

But I had overlooked the fact that tbl_name will tell me what a trigger acts on. So thanks a lot for your thoughtful posting. That will help :-)

Tom


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to