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 |
Leave a Reply