Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
277 views

Dynamically selecting a table in a query based on result from joined SELECT

I have seen many examples but they don't match with my special case (I know... everyone's case is a special case :D ) I have to match values from different tables, some of which are named after the id ...
jprealini's user avatar
  • 101
0 votes
1 answer
60 views

execute insert and select statements consecutively after a case statement

I want to execute insert and select statements once a condition is met on mysql, not sure how to do it. ##declare variables SET @fvar = 'sometxt', @svar = 'sometxtagain'; SELECT @start := 1, @...
hellyeah99's user avatar
0 votes
0 answers
686 views

MySQL IF NULL of a variable is not working as expected in a trigger

We have the following trigger to ensure that a version field is updated in a related table, normally the trigger contains only the UPDATE statement, the INSERTs are added for debugging and to explain ...
Thomas Lauria's user avatar
1 vote
1 answer
971 views

Is it safe to use user defined variables inside stored procedures in MySQL?

Currently I'm working with Stored Procedures in MySQL and I'm using in some procedures user-defined variables and I've seen that type of variables are initialized in the current session and keep their ...
Edgar Magallon's user avatar