user-defined-variables Questions
6
Solved
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 som...
Purser asked 17/6, 2009 at 23:4
1
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';
RO...
Doordie asked 14/12, 2023 at 22:59
1
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_setti...
Swami asked 18/1, 2021 at 0:50
1
© 2022 - 2024 — McMap. All rights reserved.