SQL Oracle PHP Java JSP JDBC MORE

SQL query for delete record from table


To delete records in a table from database DELETE statement is used.

SQL DELETE Syntax

DELETE FROM table_name WHERE some_column=some_value;

Here WHERE clause specifies which record is to be deleted. If you not used the WHERE clause, all records will be deleted.

How to Delete All Data from a table

To delete all the data from a table the query is

DELETE FROM table_name;

or

DELETE * FROM table_name;

Example

DELETE * FROM Student;