5 questions
0
votes
1
answer
69
views
Mysql Stored Procedure performance when using user-defined variable
I have a mysql 8.0 stored procedure which uses a start_date parameter in the logic.
If start_date is "set" (e.g., set @start_date = '2023-01-01', the query executes in a fraction of a second....
0
votes
0
answers
21
views
User defined variable in PHPMyAdmin's console not recognized
I'm testing user defined variable directly in PHPMyAdmin's console.
I've observed that if I create:
SET @myVariable = 14;
I execute it, and then try to use it in another query during the same session:...
-2
votes
1
answer
113
views
Cannot rollback user-defined variables in MySQL
First, I set John to the user-defined variable @name as shown below:
SET @name = 'John';
Then, I set David to @name in a transaction, then rollbacked as shown below:
BEGIN;
SET @name = 'David';
...
0
votes
1
answer
6k
views
postgres - unrecognized configuration parameter
I use the following query in my trigger to store user's ID for further use:
SELECT set_config('session.my_username', 'john', false);
Later, in other trigger I use it this way:
SELECT current_setting('...
555
votes
6
answers
456k
views
MySQL: @variable vs. variable. What's the difference?
In another question I posted someone told me that there is a difference between:
@variable
and:
variable
in MySQL. He also mentioned how MSSQL has batch scope and MySQL has session scope. Can ...