Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE FUNCTION [dbo].[inc] (@forLimit int)
- RETURNS @Ints TABLE
- (
- value int PRIMARY KEY
- )
- AS
- BEGIN
- DECLARE @index int
- SET @index = 0
- WHILE @index <= @forLimit BEGIN
- INSERT INTO @Ints VALUES (@index)
- SET @index = @index + 1
- END
- RETURN
- END;
- SELECT * FROM group_set g
- Cross apply inc( 1) u
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement