Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to use select union and loop

CREATE TABLE #Temp
(
  <COLUMNS>
)

 DECLARE @position INT
 SET @position = -1

 WHILE(@position < 1)
 BEGIN

    INSERT INTO #Temp (<COLUMNS>)
    SELECT * FROM mytable

    SET @position = @position + 1

 END

 SELECT * FROM #Temp
Comment

PREVIOUS NEXT
Code Example
Sql :: how to verify sequence result in oracle SQL 
Sql :: microsoft sql server management studio uppercase shortcut 
Sql :: To log postgres db in without a password 
Sql :: postgres insert timestamp without timezone 
Sql :: delete from table where length sql 
Sql :: json_modify sql server 
Sql :: mysql join column order By and group By 
Sql :: java.sql.sqlexception: the url cannot be null 
Sql :: FIND ABOVE AVERAGE SALARY EARNER IN SQL 
Sql :: sql select inside select sub query 
Sql :: what is top n result in sql 
Sql :: copy data from one database to another 
Sql :: sql constraint to check date less than current date 
Sql :: mysql in clausule string array 
Sql :: SQL CREATE INDEX Constraint 
Sql :: substract variable amount of minutes from timestamp postgresql 
Sql :: postgresql between 
Sql :: mysql multiply 
Sql :: PG::ForeignKeyViolation: ERROR: update or delete on table violates foreign key constraint 
Sql :: sql select only row with the max date 
Sql :: how to reset autoincrement in sqlite java 
Sql :: how to start postgresql laravel 
Sql :: index in mysql 
Sql :: CREATE table schema using select 
Sql :: mysqlimport 
Sql :: rename command in sql 
Sql :: Create table if not exist with exceptions 
Sql :: mysql client onnection error 
Sql :: sqlcmd xml output insert line break after every 2033 characters 
Sql :: how to select only first 3 characters in sql 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =