Home Sql Sqlbeginner Delete a Records in Database
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Delete a Records in Database

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

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

Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 12, 2008

Ask Questions?    Discuss: Delete a Records in Database  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com