mysql tutorial part 12 How to use variables

preview_player
Показать описание
-- How to reveal all variables
SHOW VARIABLES;

-- How to set a variable on select
select @myFirstVar := 'Hello world';

select @myFirstVar;

-- How to set a variable on a join
join (select @myFirstVar := 'Hello World' as var) as myVar;

select @empNumberThing := null;

-- How to increment a int
from employees;

select @empNumberThing;
Рекомендации по теме
Комментарии
Автор

Whether the data base should always be online?
Please answer.

asoundeffects