Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Update Values in a Table
How To Update Values in a Table? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements
✍: FYIcenter.com
If you want to update some values in one row or multiple rows in a table, you can use the UPDATE statement. The tutorial script below shows a good example:
mysql> UPDATE fyi_links SET counts = 999, notes = 'Good.' WHERE id = 101; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> SELECT id, url, notes, counts, DATE(created) FROM fyi_links WHERE id = 101; +-----+-------------------+-------+--------+---------------+ | id | url | notes | counts | DATE(created) | +-----+-------------------+-------+--------+---------------+ | 101 | dev.fyicenter.com | Good. | 999 | 2006-04-30 | +-----+-------------------+-------+--------+---------------+ 1 row in set (0.00 sec)
2007-05-11, 5017👍, 0💬
Popular Posts:
What is Shell scripting A shell script is a script written for the shell, or command line interprete...
How To List All Values of Submitted Fields? - PHP Script Tips - Processing Web Forms If you want lis...
What will happen in these three cases? if (a=0) { //somecode } if (a==0) { //do something } if (a===...
How To Increment Dates by 1? - Oracle DBA FAQ - Understanding SQL Basics If you have a date, and you...
How To Change the Password of Another User Account? - MySQL FAQs - Managing User Accounts and Access...