官术网_书友最值得收藏!

Using the UPDATE operation clauses

The PostgreSQL UPDATE query is used to modify the existing records in a table. You can use the WHERE clause with the UPDATE query to update selected rows; otherwise, all the rows will be updated.

The basic syntax of the UPDATE query with the WHERE clause is as follows:

UPDATE table_name
SET column1 = value1, column2 = value2...., columnN = valueN
WHERE [condition];

You can combine n number of conditions using the AND or OR operators.

The following is an example that will update SALARY for an employee whose ID is 6:

UPDATE employee SET SALARY = 15000 WHERE ID = 6; 

This will update the salary to 15000 whose ID = 6.

主站蜘蛛池模板: 维西| 怀化市| 敦化市| 洛浦县| 红河县| 勐海县| 和田市| 昭苏县| 景德镇市| 宝山区| 金昌市| 惠东县| 普定县| 南投市| 区。| 桓台县| 泽州县| 马关县| 随州市| 汪清县| 依兰县| 景宁| 呼和浩特市| 无棣县| 交口县| 玉溪市| 崇阳县| 永康市| 仁布县| 繁昌县| 普安县| 彰化市| 长垣县| 常德市| 天津市| 乐清市| 嘉祥县| 华阴市| 柘荣县| 海阳市| 咸阳市|