How To Write Delete Query In SQL

Introduction

In this article, we will learn how to write a SQL delete query.

To delete the existing data in the SQL Delete statement is used.

Syntax

DELETE FROM TABLE_NAME WHERE condition;

Note: Be careful when using the DELETE statement. Here, all records in the table will be deleted! To delete only selected records The WHERE clause is used.

Example

The subsequent statement would delete all records in the Article table.

DELETE FROM Article;

 

Also, check How To Write Insert Query In SQL

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories