Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

define a variable in mysql from select

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;
 
PREVIOUS NEXT
Tagged: #define #variable #mysql #select
ADD COMMENT
Topic
Name
1+7 =