SELECT @y = 0 SELECT @z = 0 IF @x >= 40 SELECT @y = 5 SELECT @z = 10
DECLARE @TableName varchar(20) DECLARE @SQL varchar(1000) SET @TableName = 'Employee' SET @SQL = 'SELECT * FROM + @TableName’ EXEC @SQL NOTE: Pay close attention to the syntax.