Search
 
SCRIPT & CODE EXAMPLE
 

SQL

tsql create table with variable name

DECLARE @tableGUID uniqueidentifier;
SET @tableGUID = NEWID()  
DECLARE @DynamicSQL nvarchar(1000);
SET @DynamicSQL = N'SELECT * INTO ' + @tableGUID + ' FROM OtherTable';
EXEC(@DynamicSQL);
Comment

PREVIOUS NEXT
Code Example
Sql :: how set default setting of toolbar in sql developer 
Sql :: Split Column with delimiter into multiple columns 
Sql :: extract sql from query object sqlalchemy 
Sql :: redudancy in SQL 
Sql :: alasql delete column 
Sql :: bus source and destination equal to destination and source of another by sql query 
Sql :: How to take sum of column with same id in "JPQL?" 
Sql :: Create a username nd password in MySql 
Sql :: create bakupd database sqlserver 
Sql :: sql random date between two dates 
Sql :: strftime format sqlite 
Sql :: PBI TO SQL 
Sql :: how to install firebird 
Sql :: Pattern Sql Rlike same as REGEXP 
Sql :: ring SQLite sqlite_close 
Sql :: How to fix a collation conflict in a SQL Server query 
Sql :: sqlserver: reverse like search 
Sql :: store case result sql 
Sql :: create sql table 
Sql :: sql server setup commands 
Sql :: sqlite send a query to a Sqlite DB with Ruby 
Sql :: mysql vs sql server performance benchmark 
Sql :: sql grant select only 
Sql :: hive batch drop table 
Sql :: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement 
Sql :: Bigquery insert issue 
Sql :: online convert linq to sql query 
Sql :: tsql rename column name 
Sql :: group functions in sql 
Sql :: sql multi row insert 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =