- 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
.
推薦閱讀
- Software Defined Networking with OpenFlow
- 構建移動網站與APP:HTML 5移動開發入門與實戰(跨平臺移動開發叢書)
- CentOS 7 Server Deployment Cookbook
- PHP+MySQL網站開發技術項目式教程(第2版)
- 你必須知道的204個Visual C++開發問題
- Building Minecraft Server Modifications
- Learning Python by Building Games
- Python算法從菜鳥到達人
- Swift語言實戰精講
- JavaScript應用開發實踐指南
- JavaScript+jQuery網頁特效設計任務驅動教程
- Mockito Essentials
- Puppet:Mastering Infrastructure Automation
- Java并發實現原理:JDK源碼剖析
- 3D Printing Designs:Octopus Pencil Holder