--- title: "DROP PARTITION FUNCTION (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/06/2017" ms.prod: sql ms.prod_service: "sql-database" ms.reviewer: "" ms.technology: t-sql ms.topic: "language-reference" f1_keywords: - "DROP PARTITION FUNCTION" - "DROP_PARTITION_FUNCTION_TSQL" dev_langs: - "TSQL" helpviewer_keywords: - "deleting partition functions" - "DROP PARTITION FUNCTION statement" - "partition functions [SQL Server], removing" - "dropping partition functions" - "removing partition functions" ms.assetid: a4bb055a-a538-4db9-a6fb-550d1eabfa18 author: CarlRabeler ms.author: carlrab --- # DROP PARTITION FUNCTION (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md)] 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](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## Syntax ``` DROP PARTITION FUNCTION partition_function_name [ ; ] ``` ## Arguments *partition_function_name* Is the name of the partition function that is to be dropped. ## Remarks 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. ## Permissions 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. ## Examples The following example assumes the partition function `myRangePF` has been created in the current database. ``` DROP PARTITION FUNCTION myRangePF; ``` ## See Also [CREATE PARTITION FUNCTION (Transact-SQL)](../../t-sql/statements/create-partition-function-transact-sql.md) [ALTER PARTITION FUNCTION (Transact-SQL)](../../t-sql/statements/alter-partition-function-transact-sql.md) [EVENTDATA (Transact-SQL)](../../t-sql/functions/eventdata-transact-sql.md) [sys.partition_functions (Transact-SQL)](../../relational-databases/system-catalog-views/sys-partition-functions-transact-sql.md) [sys.partition_parameters (Transact-SQL)](../../relational-databases/system-catalog-views/sys-partition-parameters-transact-sql.md) [sys.partition_range_values (Transact-SQL)](../../relational-databases/system-catalog-views/sys-partition-range-values-transact-sql.md) [sys.partitions (Transact-SQL)](../../relational-databases/system-catalog-views/sys-partitions-transact-sql.md) [sys.tables (Transact-SQL)](../../relational-databases/system-catalog-views/sys-tables-transact-sql.md) [sys.indexes (Transact-SQL)](../../relational-databases/system-catalog-views/sys-indexes-transact-sql.md) [sys.index_columns (Transact-SQL)](../../relational-databases/system-catalog-views/sys-index-columns-transact-sql.md)