Library tutorials & articles
MySQL Tutorial
The UPDATE statement
The update statement is used to update records in a database. The keywords used in an update statement are summarised in the following table.
| Keyword | Description |
|---|---|
| UPDATE | Updates data in one or more tables. |
| SET | Specifies the field names to be updates. If the fields belong to more that one table, the table name should be specified before the field name. (eg. search.Page). |
| WHERE | Criteria to restrict the records updated. |
The following example updates all records in the search table to change the category from Jive, to Java.
update.sql
UPDATE search
SET Category = 'Java'
WHERE Category = 'Jive';
The file may then be used with MySQL as follows:
mysql> \. update.sql
The same characters need escaping as mentioned on the previous page.
Related articles
Related discussion
-
Lets Open our Eyes
by mawcot (0 replies)
-
London PHP / MySQL Superstar needed!
by gatewaytechnolabs (1 replies)
-
PHP - Dreamweaver Web Developer Required - London UK
by webdeveloperit (3 replies)
-
how create multilanguage website in php using unicode database as mysql?
by osmancarik (2 replies)
-
New Website requires Top level PHP MYSQL Program Advisor
by raj_animator967452 (1 replies)
Related podcasts
-
Scaling Large Web Sites with Joe Stump, Lead Architect at DIGG
Have you ever wanted to learn how top 100 web sites are architected? Deep Fried Bytes hosts Keith Elder and Chris Woodruff sat down with Joe Stump, Lead Architect at DIGG to discuss scaling large web sites, his life, development experiences and team building. Listen to the showThanks to our gues...
Events coming up
-
Dec
3
The Auckland PHP December meetup
Auckland, New Zealand
Topic: Magento E-Commerce platform Speaker: Robert Popovic, LERO9, Robert is the Technical Director and co-founder of LERO9. Robert attended the Electrotechnical Faculty at The University of Belgrade where he graduated with a Masters in Computer Science and Information Technology. Robert has worked exclusively in the field of web and software development throughout his career.
More good mysql examples:
http://www.examplenow.com/mysql/alter
--John
!--removed tag-->Dear Sir/ Madam
I need your help, how to done replication method in MySQL Server. or if any automatic schedule scripting awailble. pls send my mail id as soon as possible.
i will waiting for your mail
email : vinaymeetu@ymail.com, or vinaywaiting4u@gmail.com,
Regards
Vinay.G.Liyar
This thread is for discussions of MySQL Tutorial.