--- title: Delete Queries ms.custom: seo-lt-2019 ms.date: 01/19/2017 ms.prod: sql ms.prod_service: sql-tools ms.technology: ssms ms.topic: conceptual helpviewer_keywords: - "dropping queues" - "deleting queries" - "removing queries" - "queries [SQL Server], deleting" ms.assetid: 084e1504-3d2f-4bd9-b97c-b9c8c874751c author: markingmyname ms.author: maghan ms.manager: jroth ms.reviewer: --- # Delete Queries (Visual Database Tools) [!INCLUDE[appliesto-ss-asdb-asdw-pdw-md](../../includes/appliesto-ss-asdb-asdw-pdw-md.md)] You can delete a query, removing it from the project and permanently deleting it from the file system. Queries deleted using the following procedure are not sent to the Recycle Bin and cannot be recovered. ### To permanently delete a query 1. From the **View** menu, choose Solution Explorer. 2. In Solution Explorer, select the query you want to permanently delete. 3. Right-click the query and from the shortcut menu, click **Remove**. 4. In the **Microsoft SQL Server Management Studio** dialog box, click **Delete**. > [!NOTE] > If you want to remove the query from the project without deleting it, click **Remove**. Then you can right-click the query folder and choose **Add Item** to find and add the query back later. ## See Also [Clear Query Results (Visual Database Tools)](../../ssms/visual-db-tools/clear-query-results-visual-database-tools.md) [Discard Changes Made to Queries (Visual Database Tools)](../../ssms/visual-db-tools/discard-changes-made-to-queries-visual-database-tools.md) [Design Queries and Views How-to Topics (Visual Database Tools)](../../ssms/visual-db-tools/design-queries-and-views-how-to-topics-visual-database-tools.md) [Perform Basic Operations with Queries (Visual Database Tools)](../../ssms/visual-db-tools/perform-basic-operations-with-queries-visual-database-tools.md)