SQL DELETE
SQL DELETE
The DELETE statement is used to delete existing records in a table.
Student table:
Regno | Name | Dob | Contact | state |
1001 | funda | 20-june-2000 | 9696985457 | karnataka |
1002 | of | 18-march-2003 | 8585969674 | haryana |
1003 | web | 12-may-1998 | 8256968475 | karnataka |
1004 | it | 24-nov-1994 | 9785956748 | goa |
Syntax:
DELETE FROM table_Name WHERE condition;
Example :
DELETE FROM student WHERE regno='1004';
The OUTPUT for the above query:
Regno | Name | Dob | Contact | state |
1001 | om | 20-june-2000 | 8596874858 | karnataka |
1002 | of | 18-march-2003 | 8585969674 | haryana |
1003 | web | 12-may-1998 | 8256968475 | karnataka |