开发者

in sql2005 what is master.dbo.spt_values and how do you use it?

开发者 https://www.devze.com 2023-02-06 05:34 出处:网络
as startted int he title: in sql2005 what is master.dbo.spt_values and how do you use it?开发者_如何转开发I\'ve no idea what its actual purpose is but you will often see it pressed into service as a h

as startted int he title: in sql2005 what is master.dbo.spt_values and how do you use it?开发者_如何转开发


I've no idea what its actual purpose is but you will often see it pressed into service as a handy adhoc numbers table with numbers between 0-2047.

select number from master..spt_values where type='P'

Some examples of where this would be useful are listed here: Why should I consider using an auxiliary numbers table?

For your own code you are much better off creating your own permanent indexed numbers table though.

0

精彩评论

暂无评论...
验证码 换一张
取 消