The SQL DELETE Query is used to delete the existing records in a database table.
DELETE Query with Where
Syntax of DELETE Query in SQL
DELETE FROM table_name WHERE condition;
Example OF SQL DELETE QUERY
The following SQL statement deletes the T4Tutorials_Name”Asad” from the “Customers” table:
DELETE FROM fee WHERE T4Tutorials_Name=’Asad’;
This query will delete the full row of T4Tutorials_RollNo=16.
DELETE Query to Delete All the Records
It is possible to delete all the rows and data in a table without deleting the table, table structure, table attributes, and indexes.
DELETE FROM table_name;
The following SQL query deletes all the rows in the “fee” table, without deleting the table,table structure, table attributes, and indexes.
Example of SQL Query to Delete All the Records in a table
DELETE FROM fee;
This query will delete the data of full table.
- Why do we need various number systems in computer science? - April 16, 2021
- 5 Best Places to Study Engineering - March 19, 2021
- How Students Can Pick a Good Custom-Paper Writing Service? - March 5, 2021