📜  在 mysql from select 中定义一个变量 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:02.494000             🧑  作者: Mango

代码示例1
SELECT salary INTO @variable1 FROM employee_info WHERE emp_id = 12345678 LIMIT 1;
SELECT salary, salary_group INTO @var1, @var2 FROM employee_info WHERE emp_id = 12345678;