Delete a Records in Database

The Delete Statement is used to delete the records and rows from the table.

Delete a Records in Database

Delete a Records in Database

     

The Delete Statement is used to delete the records and rows from the table. The generalized Syntax  used for delete query in database are as :

delete from table name;

The above syntax is used to delete an entire record and rows from a table.

delete  from "name of table" where "columnname" operator "value";

The Syntax is used to delete the records or rows from a table followed by where clause, that include the condition on column.

Understand with Example

The Tutorial illustrates an example to delete Records in Database. In this Tutorial, we create a table country, in which we add a record or rows into table using insert into query.

The select retrieve the record from a table country.

insert into country values('India','Delhi');

insert into country (countryname) values('Norway');

select * from country;

 

The delete query is used to delete the record from table country  followed by where clause, which include the condition upon the column specified in query.

The select query shows you the current column field and its record value from table country.

delete from country where countryname='Norway';

select * from country;

 

Download Source