【发布时间】:2011-05-15 11:53:15
【问题描述】:
系统表master..spt_values的用途是什么?
为什么提供它以及应该如何使用它?
它的类型,低值,高值是什么意思?
更新:
谷歌搜索给出了数以千计的“它的用途”,例如:
- to split column using master..spt_values
- it contains numbers from 0 to 2047. It is very useful.for example if you need to populate a table with 100 numbers from this range
- for building indexes
- creating virtual calendars
- 以某种不直观和复杂的方式获取使用对象的描述
Enumerate all the indexes in a SQL Server database (Giuseppe Dimauro, devx.com) - "SQL Server 2005 script to display disk space usage"
-
"It's not worth talking about. This table is a design nightmare of a "super" lookup table"
一些帖子警告不要使用它,因为它可以在 SQL Server 的未来版本中删除,但已经有代码脚本使用它来说明新 SQL Server 11 (Denali) 的新功能:
- Using OFFSET N ROWS FETCH NEXT N ROWS ONLY In SQL Server Denali for easy paging
【问题讨论】:
标签: sql sql-server database-design configuration