_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › PartitionedTableInfo
select
	OBJECT_NAME(object_id) object_name
,	c.name partition_schema
,	a.name partition_function
,	b.value 
,	d.rows
from sys.partition_functions a 
	inner join sys.partition_range_values b
		on a.function_id = b.function_id
	inner join sys.partition_schemes c
		on a.function_id = c.function_id
	inner join (
		select distinct 
			a.object_id 
		,	a.index_id
		,	a.partition_number
		,	c.name 
		,	a.rows
		from sys.partitions a 
			inner join sys.indexes b
				on a.object_id = b.object_id
			inner join sys.data_spaces c
				on b.data_space_id = c.data_space_id) d
		on c.name = d.name 
		and b.boundary_id = d.partition_number
where d.object_id=object_id('Stg_TotalSale_Netmarble')


/*
select * from sys.partitions
select * from sys.data_spaces 
select * from sys.indexes
select * from sys.partition_schemes
select * from sys.partition_functions
select * from sys.partition_range_values
*/
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

伎 願 願 願 伎 伎螳.