On 2013/11/01 14:41, techi eth wrote:
I think so checking possible cases of any sqlite operation should not be
called as bogus. Where ever I am not sure I will ask expert help & I have
got all the time right answers.
My point here is (and was) that the SQL you said that you have tried, is completely bogus, it exists not in any form of SQL server in this World. I did not say that you are asking a bogus question - and the point of that being that you cannot simply make up SQL statements... at least try something that exists in reality and then maybe we can help if something is wrong with that.

I am checking the case where database tables are created by different
application. I am sure different application may not check available
trigger name in all tables before creating new trigger//...
They might not check yes, but if they don't, they will get errors - You cannot create the same trigger name more than once on any SQL table - and as far as I know, in SQLIte specifically, you cannot even have the same trigger name for different tables within the same database - so it is impossible to create the scenario for which you want to test with your code.


*Question:*

What happen when same trigger name is used by two different tables in
database and drop trigger query get executed.Find below statement :

CREATE TRIGGER TestTrigger AFTER INSERT ON TestTbl1 BEGIN SELECT
Trigger_notifier_function();END


CREATE TRIGGER TestTrigger AFTER INSERT ON TestTbl2 BEGIN SELECT
Trigger_notifier_function1();END

DROP TRIGGER IF EXISTS TestTrigger

Please correct me if my question is wrong.
Note: Trigger logic will be different but trigger names are same.
This is what I mean with bogus SQL... have you actually tried to do that in SQLite? You cannot do it, the second trigger will never be created and therefore never be possible to exist, and therefore unnecessary to check for. Check it for yourself!



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to