SQL DELETE ROW

Let us take an example of student.

Original table:

ID STUDENT_NAME ADDRESS
001 AJEET MAURYA GHAZIABAD
002 RAJA KHAN LUCKNOW
003 RAVI MALIK DELHI

If you want to delete a student with id 003 from the student_name table, then the SQL DELETE query should be like this:

DELETE FROM student_name WHERE id = 003;

Resulting table after SQL DELETE query:

ID STUDENT_NAME ADDRESS
001 AJEET MAURYA GHAZIABAD
002 RAJA KHAN LUCKNOW

SQL DELETE ALL ROWS

The statement SQL DELETE ALL ROWS is used to delete all rows from the table. If you want to delete all the rows from student table the query would be like,

DELETE FROM STUDENT_NAME;