dole doug
dole doug

Reputation: 36048

using variables in my mysql stored procedure

In my stored procedure I need to use some variable names as foo1, foo2, foo3 .... foo10 This is not a problem, on the declaration stage, but in the logic stage, doing the calculus this is a real pain.

For example, how can I do: bar[i] = ( foo[i] + foo10 ) / foo[i];

PS: if there is not any way of using arrays, can I use concaternation, in order to get:
foo1 = 'foo' + '1'? Adain, foo1 is a variable name;

Upvotes: 0

Views: 92

Answers (1)

jmoreno
jmoreno

Reputation: 13561

SQL does not have arrays, it has tables which are sets. If you give a concrete example of what you want to do, someone might be able to help you, but for the moment you're barking up the wrong tree.

Upvotes: 1

Related Questions