MySQL Forums
Forum List  »  Triggers

Trigger with loop from an array
Posted by: ANJA.WEISS@ITENOS.DE ANJA.WEISS@ITENOS.DE
Date: March 20, 2014 07:59AM

I need in a MySQL Trigger a syntax which can loop from an variable which is defined as an array. Can anyone give me a tip how I can realize this?
Here is the example in Oracle PL/SQL:

var := varArray('element1', 'element2', 'element3)
cntVar := var.count
for i in 1 .. cntVar
LOOP
select var(i) FROM table; x)
END LOOP;

x) or (if the above dynamic sql-statement is not possible in mysql-Trigger):
_ select * from table where column1 = var(i) _

How can I implement this syntax in mySQL trigger-lanquage?

Many thanks!
Anja



Edited 1 time(s). Last edit at 03/20/2014 08:13AM by ANJA.WEISS@ITENOS.DE ANJA.WEISS@ITENOS.DE.

Options: ReplyQuote


Subject
Views
Written By
Posted
Trigger with loop from an array
5241
March 20, 2014 07:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.