Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare @x int
- set @x = 1
- if (@x = 0)
- begin
- select 1 as Value into #temptable
- end
- else
- begin
- select 2 as Value into #temptable
- end
- select * from #temptable
- drop table #temptable
- SELECT field-list INTO #symbol ...
- DECLARE #symbol_sessionid TABLE(field-list)
- INSERT INTO #symbol_sessionid SELECT field-list ...
- IF OBJECT_ID('tempdb..#temptable', 'U') IS NOT NULL
- BEGIN
- DROP TABLE #temptable
- END
- CREATE TABLE #temptable (Value INT)
- declare @x int
- set @x = 1
- if (@x = 0)
- begin
- INSERT INTO #temptable (Value) select 1
- end
- else
- begin
- INSERT INTO #temptable (Value) select 2
- end
- select * from #temptable
- drop table #temptable
Add Comment
Please, Sign In to add comment