MySQL: To see GLOBAL and SESSION variables side by side
here’s a single MySQL query that shows a system parameter’s GLOBAL and SESSION values side-by-side.
You just replace 'sql_mode' with the variable you want to check.
here’s a single MySQL query that shows a system parameter’s GLOBAL and SESSION values side-by-side.
You just replace 'sql_mode' with the variable you want to check.
Sql
SELECT
gv.VARIABLE_NAME,
gv.VARIABLE_VALUE AS GLOBAL_VALUE,
sv.VARIABLE_VALUE AS SESSION_VALUE
FROM performance_schema.global_variables gv
JOIN performance_schema.session_variables sv
ON gv.VARIABLE_NAME = sv.VARIABLE_NAME
WHERE gv.VARIABLE_NAME = 'sql_mode';
Comments
Post a Comment