Minggu, 10 Oktober 2010
AutoGenerate Numeric ID’s in SQL Server with No Sequence
Sometime back, I had written a post to AutoGenerate an AlphaNumeric Sequence in SQL ServerTumo Jobas wrote back today asking if it was possible to use a similar method to generate a 10 digit number but with no sequence. Here’s one way that SQL MVP Peter Larsson uses often using NEWID() and I think it’s pretty slick. This solution will work in SQL Server 2005/2008. DECLARE @TT TABLE(ID int,
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar