db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aneez Backer <aneez_bac...@yahoo.com>
Subject Derby Equivalent of MySql queries
Date Wed, 21 Nov 2007 10:53:58 GMT
Hi

Am a newbie to  using derby and databases in general.

I need the following MySql Queries to be Derby compatible. Can anyone let me know their Derby
equivalent? 

--------------------------------------------------
DELIMITER |
CREATE TRIGGER TrignameA
AFTER DELETE ON TABLEA
FOR EACH ROW BEGIN
UPDATE TABLEB SET TAGCOUNT=(TAGCOUNT-1) WHERE ID=OLD.TAG_ID;
END|

CREATE TRIGGER TrignameB
AFTER INSERT ON TABLEA
FOR EACH ROW BEGIN
UPDATE TABLEB SET TAGCOUNT=(TAGCOUNT+1) WHERE ID=NEW.TAG_ID;
END|
DELIMITER ;
--------------------------------------------------

My project involves switching a database application on MySql to Derby. I have been successful
in making the slight modifications needed in the SQL queries, but have not been able to find
the correct derby equivalents of the above MySql queries.

Thanks
Aneez



            














       
---------------------------------
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.
Mime
View raw message