Search
 
SCRIPT & CODE EXAMPLE
 

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;
Comment

PREVIOUS NEXT
Code Example
Sql :: SQL Modify Column in a Table -MySQL 
Sql :: mysql delete all except 
Sql :: oracle apex debug mode 
Sql :: mysql case when or 
Sql :: drop table if exists test 
Sql :: How to convert DateTime to VarChar SQL 
Sql :: sql alter type of column 
Sql :: postgresql add column 
Sql :: t-sql delete view if exists 
Sql :: sql server output parameter 
Sql :: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file 
Sql :: sql select into statement 
Sql :: create index mysql 
Sql :: SQL Auto Increment Primary Key - PostgreSQL 
Sql :: mysql compare datetime to another datetime 
Sql :: windows services sql 
Sql :: mysql event last execution 
Sql :: oracle running queries sql 
Sql :: RowDataPacket 
Sql :: select random sql 
Sql :: sql remove decimal places 
Sql :: sqlite save db 
Sql :: restore backup to new database sql server 
Sql :: how to check if a column is null in sql 
Sql :: Parsing XML IN SQL Server 
Sql :: get last 50 rows sql 
Sql :: sql between 
Sql :: insert into using contant values and source table columns with sql 
Sql :: sql server last character in string 
Sql :: postgresql filter on 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =