CREATE PROCEDURE [dbo].[marctest2]
AS
SET NOCOUNT ON
INSERT INTO #marc VALUES (4, ‘Test 4’)
INSERT INTO #marc VALUES (5, ‘Test 5’)
INSERT INTO #marc VALUES (6, ‘Test 6’)
GO
CREATE PROCEDURE [dbo].[marctest1]
AS
SET NOCOUNT ON
CREATE TABLE #marc
(
id int,
data varchar(10)
)
INSERT INTO #marc VALUES (1, ‘Test 1’)
INSERT INTO #marc VALUES (2, ‘Test 2’)
INSERT INTO #marc VALUES (3, ‘Test 3’)
exec marctest2
INSERT INTO #marc VALUES (7, ‘Test 7’)
INSERT INTO #marc VALUES (8, ‘Test 8’)
select * from #marc
go
EXEC [dbo].[marctest1]