Try the Introductory SQL Course for Free!

The DELETE Statement in SQL- Tutorial

/ / Access 2013, Latest, Microsoft, Office 2013, SQL
The DELETE Statement in SQL- Tutorial: A picture from the video lesson

The DELETE Statement in SQL: Overview

            The DELETE statement in SQL is used to remove specified records from a table. Like the UPDATE statement, it includes a WHERE clause that you should ensure is correct before executing the DELETE statement in SQL. If you do not specify a WHERE clause within the DELETE statement in SQL, you will delete ALL the records within the table! The core SQL of the DELETE statement in SQL is shown below. Note that the “table_name” parameter is the name of the table that contains the records to delete. The “field_name” parameter is the name of a field within the table. The “delete_value” parameter is the value within the “field_name” specified, for which you want to delete any matching records.

DELETE FROM table_name

WHERE field_name=delete_value

            Note that if you want to delete ALL records from a table, you can use the DELETE FROM statement without the WHERE clause. Executing this statement will delete all records from the table specified, but leave the structure and indexes of the table intact. As mentioned earlier, you should ALWAYS use care to double-check your SQL statement before executing a DELETE or UPDATE statement.

The DELETE Statement in SQL- Tutorial: A picture from the video lesson "The DELETE Statement" within the training interface of the "Mastering Introductory SQL Made Easy v.1.0" SQL training course.

The DELETE Statement in SQL- Tutorial: A picture from the video lesson “The DELETE Statement” within the training interface of the “Mastering Introductory SQL Made Easy v.1.0” SQL training course.

            The specific SQL implementations of the DELETE statement within MySQL 5.7, SQL Server 2012, and Access 2013 are shown at the hyperlinks listed below.

My SQL 5.7:

https://dev.mysql.com/doc/refman/5.7/en/delete.html

SQL Server 2012:

https://technet.microsoft.com/en-us/library/ms189835.aspx

Access 2013:

https://msdn.microsoft.com/en-us/library/office/ff195097.aspx

The DELETE Statement in SQL: Syntax

DELETE FROM table_name

WHERE field_name=delete_value

The DELETE Statement in SQL: Video Lesson

You can watch the following video lesson, titled “The DELETE Statement,” to see how you can use the DELETE statement in SQL. This video is from our complete Introductory SQL training, titled “Mastering Introductory SQL Made Easy v.1.0.”

TOP
Sale! $49 All-Access 1 Days 20 Hours 39 Minutes 2 Seconds      $199 $49 Entire Library!
See Deal