Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

tsql generate rows

-- generate a identity, and guid table without looping
;with guids( i, guid ) as
(
    select 1 as i, newid()
        union all
    select i + 1, newid()
        from guids
        where i < 10000
)

select i, guid   
from guids 
order by i desc
 
PREVIOUS NEXT
Tagged: #tsql #generate #rows
ADD COMMENT
Topic
Name
3+1 =