Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 SQL Enterprise 2005 中有一个分区表。我需要查询 PARTITION FUNCTION 以找到它的分区范围。什么 SQL 查询会给我这些值?
从 SQL 分析器中得到这个,观察管理工作室生成用于创建函数的脚本
SELECT sprv.value AS [Value], sprv.boundary_id AS [ID] FROM sys.partition_functions AS spf INNER JOIN sys.partition_range_values sprv ON sprv.function_id=spf.function_id WHERE (spf.name=N'fnPartitionLast30Days') ORDER BY [ID] ASC