SQL Server List all Partitioned tables
- Kunal Ranpura
- Jan 13, 2020
- 1 min read
Find list of all the partitioned tables in sql server.
use userdb_name
go
select distinct t.name
from sys.partitions p
inner join sys.tables t
on p.object_id = t.object_id
where p.partition_number <> 1
--and t.name ='Customer'
Find if the customer table is partitioned or not
use userdb_name
go
select distinct t.name
from sys.partitions p
inner join sys.tables t
on p.object_id = t.object_id
where p.partition_number <> 1
and t.name ='Customer'
Comments