drop table adventureworks.dbo.GENERATOR_TABLE
create table adventureworks.dbo.[GENERATOR_TABLE] ( [ID] [int] IDENTITY (1, 1) NOT NULL, [DUMMY] [char] (1) NULL )
CREATE PROCEDURE dbo.[GENERATOR_PROC]
AS
BEGIN
INSERT INTO adventureworks.dbo.GENERATOR_TABLE ([DUMMY]) VALUES (NULL)
RETURN (@@IDENTITY)
END
DECLARE @ID INT
EXEC @ID = GENERATOR_PROC
PRINT @ID
Till Next Time
multiple first day of week
-
Nice trick:
http://richardlees.blogspot.nl/2015/08/supporting-multiple-first-day-of-week.html