Basic Oracle Concepts and Programming Question:
How To Update Values in a Table in Oracle?
Answer:
If you want to update some values in one row or multiple rows in a table, you can use the UPDATE statement. The script below shows a good example:
UPDATE ggl_links SET counts = 999, notes = 'Good site.'
WHERE id = 101;
1 row updated.
SELECT * FROM ggl_links WHERE id = 101;
<pre> ID URL NOTES COUNTS CREATED
---- ------------------------ ---------- ------ ---------
101 http://www.globalguideline.com Good site. 999 07-MAY-06</pre>
UPDATE ggl_links SET counts = 999, notes = 'Good site.'
WHERE id = 101;
1 row updated.
SELECT * FROM ggl_links WHERE id = 101;
<pre> ID URL NOTES COUNTS CREATED
---- ------------------------ ---------- ------ ---------
101 http://www.globalguideline.com Good site. 999 07-MAY-06</pre>
Previous Question | Next Question |
How To Insert Multiple Rows with One INSERT Statement in Oracle? | How To Update Values on Multiple Rows in Oracle? |