Search
 
SCRIPT & CODE EXAMPLE
 

SQL

store select query result in variable sql server

DECLARE @result1 TABLE (a INT, b INT, c INT)

INSERT INTO @result1
SELECT a, b, c
FROM table1

SELECT a AS val FROM @result1
UNION
SELECT b AS val FROM @result1
UNION
SELECT c AS val FROM @result1
Comment

PREVIOUS NEXT
Code Example
Sql :: how to create a table in mysql 
Sql :: get record which is available in one table but not in another mysql 
Sql :: sql only five first row 
Sql :: username sql 
Sql :: drop multiple columns in sql 
Sql :: sql get month from date 
Sql :: create or replace view postgress 
Sql :: how to get the date from datetime in mysql 
Sql :: sql pagination oracle 
Sql :: oracle list dates without weekends 
Sql :: check postgresql version in rails console 
Sql :: sql server insert into select 
Sql :: space not removing from column in sql 
Sql :: postgre describe table 
Sql :: temp table vs variable table in sql server 
Sql :: update with join 
Sql :: postgres regular expression replace 
Sql :: add a day big query 
Sql :: Get first 10 in sql 
Sql :: postgres select duplicate columns 
Sql :: delete database mysql command 
Sql :: sql change date format 
Sql :: check database size in gb mysql 
Sql :: creating index in mysql 
Sql :: with postgres 
Sql :: reset auto increment mysql 
Sql :: mysql query with sql to get the next row 
Sql :: sql replace single quote 
Sql :: create temp table in sql 
Sql :: sql database connectivity 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =