CREATE PROCEDURE dbo.test1 @choice bit = 0 as if @choice=0 SELECT 1 x INTO #TEMPTABLE else SELECT 0 x INTO #TEMPTABLE