書名: PostgreSQL Development Essentials作者名: Manpreet Kaur Baji Shaik本章字數: 120字更新時間: 2021-07-14 10:00:55
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
.
推薦閱讀
- C++面向對象程序設計(第三版)
- ClickHouse性能之巔:從架構設計解讀性能之謎
- Objective-C應用開發全程實錄
- Java EE 6 企業級應用開發教程
- Oracle Exadata性能優化
- 計算機圖形學編程(使用OpenGL和C++)(第2版)
- 從0到1:HTML+CSS快速上手
- Getting Started with SQL Server 2012 Cube Development
- PHP+MySQL網站開發項目式教程
- The Complete Coding Interview Guide in Java
- 劍指MySQL:架構、調優與運維
- PHP 7+MySQL 8動態網站開發從入門到精通(視頻教學版)
- R語言與網絡輿情處理
- 微信小程序開發與實戰(微課版)
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例