Databases| SQL| MySQL| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
Update Records in Database 
 

The Update Records in database is used to modify or change the value of records which match with a specified criteria.

 

Update Records in Database

                         

The Update Records in database is used to modify or change the value of records which match with a specified criteria. The update query is accompanied by where clause that specify the condition on column specified. The Syntax used for Update Records are given as:

update "name of table" set "column name"="new value" where column name=" "

The above Syntax in SQL is used to update the table

set column name : Specify the name of the column where you want to set a new value.

where : The where clause specify the condition on the basis of which set a new value into a table.

 

Understand with Example

The Tutorial illustrates an example from update record in database. In this Tutorial, the code run a select query to retrieve the records from a table country. The Table show you the record from table country. The Update query is used to specify the name of the column where you want to set a new value. In this database, we update a table country and set the new value to the column 'countrycapital' using where clause specify the condition on column specified upon the basis of which you a set a new value into a table.

Syntax used in Update Query

The select is used to retrieve the record  from table country.

The Update statement is used to update the table country where you want to set a new value for a column and  clause where  specify the condition upon the basis on which you set a new record into the column table.

select * from country;

update country set countrycapital='oslo'where countryname='norway';

Output of the above Query

Download Source

                         

» View all related tutorials
Related Tags: sql c beginner ant io struct unique tutorial int ria for to learn ear e in sta nt tr wan

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.