Hi All,
Hope you all are doing good.
In this article, we will know about how to update data in a table.
Update value of a single column in all rows example:
UPDATE CUSTOMERS
SET ADDRESS = 'Bangalore'
WHERE ID = 6;
Update values of 2 or more columns example:
UPDATE CUSTOMERS
SET ADDRESS = 'Bangalore', SALARY = 20000.00;
WHERE ADDRESS = 'Mangalore'
Note: Be careful while using update statement. If you miss WHERE clause, all records will be updated.
Thanks for reading my article.
Hope you all are doing good.
In this article, we will know about how to update data in a table.
Update value of a single column in all rows example:
UPDATE CUSTOMERS
SET ADDRESS = 'Bangalore'
WHERE ID = 6;
Update values of 2 or more columns example:
UPDATE CUSTOMERS
SET ADDRESS = 'Bangalore', SALARY = 20000.00;
WHERE ADDRESS = 'Mangalore'
Note: Be careful while using update statement. If you miss WHERE clause, all records will be updated.
Thanks for reading my article.
No comments:
Post a Comment