일or놀이/MS-SQL

쿠폰 시리얼 번호 생성때 써먹을만한것

TIGERJUNE 2006. 11. 23. 18:43

select top 150000 newID() as code

select top 150000 newID() as code from  sysobjects

select top 150000 newID() as code from  sysobjects ta, sysobjects tb

select top 150000 newID() as code from  sysobjects ta, sysobjects tb, sysobjects tc

select X.code
from
(
select top 150000 left(replace(newID(),'-',''),16) as code
from  sysobjects ta, sysobjects tb, sysobjects tc
) X
group by X.code