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 on Multiple Rows
How To Update Values on Multiple Rows? - Oracle DBA FAQ - Understanding SQL DML Statements
✍: FYIcenter.com
If the WHERE clause in an UPDATE matches multiple rows, the SET clause will be applied to all matched rows. This rule allows you to update values on multiple rows in a single UPDATE statement. Here is a good example:
UPDATE fyi_links SET counts = 9, notes = 'Wrong URL' WHERE id >= 250; 3 rows updated. SELECT * FROM fyi_links WHERE id >= 250; ID URL NOTES COUNTS CREATED ----- -------------------- ------------ ------- --------- 250 Retail Sales.com Wrong URL 9 07-MAY-06 260 Recruiting.com Wrong URL 9 07-MAY-06 270 Payroll.com Wrong URL 9 07-MAY-06
This statement updated 3 rows with the same new values on all 3 rows.
2007-04-21, 5608👍, 0💬
Popular Posts:
Can you explain in brief how can we implement threading ? Private Sub Form1_Load(ByVal sender As Sys...
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written...
What are the types of variables x, y, y and u defined in the following code? #define Atype int* type...
What is Traceability Matrix? Traceability Matrix is one of the document will prepare by QA.To make s...
How do we host a WCF service in IIS? Note: - The best to know how to host a WCF in IIS is by doing a...