开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜