Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

DROP PARTITION FUNCTION (Transact-SQL)

Removes a partition function from the current database. Partition functions are created by using CREATE PARTITION FUNCTION and modified by using ALTER PARTITION FUNCTION.

Topic link icon Transact-SQL Syntax Conventions


DROP PARTITION FUNCTION partition_function_name [ ; ]
partition_function_name

Is the name of the partition function that is to be dropped.

A partition function can be dropped only if there are no partition schemes currently using the partition function. If there are partition schemes using the partition function, DROP PARTITION FUNCTION returns an error.

Any one of the following permissions can be used to execute DROP PARTITION FUNCTION:

  • ALTER ANY DATASPACE permission. This permission defaults to members of the sysadmin fixed server role and the db_owner and db_ddladmin fixed database roles.
  • CONTROL or ALTER permission on the database in which the partition function was created.
  • CONTROL SERVER or ALTER ANY DATABASE permission on the server of the database in which the partition function was created.

The following example assumes the partition function myRangePF has been created in the current database.

DROP PARTITION FUNCTION myRangePF;
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.