CREATE TABLE tempdb..Temporal([OrderArticleId] [int] NULL,[OrderId] [int] NULL) WITH (DISTRIBUTION = ROUND_ROBIN,CLUSTERED COLUMNSTORE INDEX)
CREATE TABLE ##Temporal ([OrderArticleId] [int] NULL,[OrderId] [int] NULL) WITH (DISTRIBUTION = ROUND_ROBIN,CLUSTERED COLUMNSTORE INDEX)
CREATE TABLE #Temporal ([OrderArticleId] [int] NULL,[OrderId] [int] NULL) WITH (DISTRIBUTION = ROUND_ROBIN,CLUSTERED COLUMNSTORE INDEX)
CREATE PROCEDURE LoadTempTable
AS
BEGIN
DECLARE @Value INT = 0;
SET NOCOUNT ON;
BEGIN TRANSACTION
WHILE @Value <100
begin
set @value=@value+1
INSERT INTO #Temporal ([OrderArticleId],[OrderId]) values(@Value,@Value)
end
commit transaction
END
exec LoadTempTable
select * from #temporal
drop table #temporal ( When the session will close this table will be deleted too without running the drop command )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.