DELETE Statement in MS SQL Server Last Updated : 06 Jun, 2024 Comments Improve Suggest changes Like Article Like Report The DELETE statement in MS SQL Server deletes specified records from the table. SyntaxMS SQL Server DELETE statement syntax is: DELETE FROM table_name WHERE condition; Note: Always use the DELETE statement with WHERE clause. The WHERE clause specifies which record(s) need to be deleted. If you exclude the WHERE clause, all records in the table will be deleted. DELETE Statement in MS SQL Server ExamplesLet's look at some examples of the DELETE statement in MS SQL Server. The MS SQL Server DELETE Statement with examples will help in understanding the concept better. First, we will create a demo SQL database and table, and use the DELETE statement on it. Table Student StudentNameRollNoCityABC1JaipurDEF2DelhiJKL3NoidaXYZ4DelhiDelete a single record using DELETE StatementThe following SQL statement deletes a row from “Student” table which has StudentName as 'ABC'. DELETE FROM student WHERE StudentName = 'ABC';SELECT * FROM student;Output StudentNameRollNoCityDEF2DelhiJKL3NoidaXYZ4DelhiDelete all the records using DELETE statementIt is possible to delete all rows from a table without deleting the table. This means that the table structure, attributes, and indexes are going to be intact. DELETE FROM student;SELECT * FROM student;Output: StudentNameRollNoCity Comment More infoAdvertise with us Next Article DELETE Statement in MS SQL Server K khushboogoyal499 Follow Improve Article Tags : DBMS SQL DBMS-SQL SQL-Server Similar Reads Insert Statement in MS SQL Server The SQL Server INSERT statement is a fundamental command used to add new rows of data to a table. Whether we are inserting specific values, utilizing default values or copying data from another table.In this guide, weâll explore various ways to use the Insert statement in MS SQL Server with the help 4 min read Select Statement in MS SQL Server The SELECT statement in SQL Server is a foundational SQL command used for querying and retrieving data from one or more tables within a database. This command allows users to specify which columns and rows to retrieve and apply filters to focus on specific data and perform various operations to mani 4 min read SQL Server MERGE Statement SQL Server MERGE statement combines INSERT, UPDATE, and DELETE operations into a single transaction. MERGE in SQL ServerThe MERGE statement in SQL provides a convenient way to perform INSERT, UPDATE, and DELETE operations together, which helps handle the large running databases. But unlike INSERT, U 2 min read SQL SERVER | Conditional Statements While loop: In SQL SERVER, while loop can be used in similar manner as any other programming language. A while loop will check the condition first and then execute the block of SQL Statements within it as long as the condition evaluates true. Syntax: WHILE condition BEGIN {...statements...} END; Par 2 min read SQL DELETE Statement The SQL DELETE statement is an essential command in SQL used to remove one or more rows from a database table. Unlike the DROP statement, which removes the entire table, the DELETE statement removes data (rows) from the table retaining only the table structure, constraints, and schema. Whether you n 4 min read Like