当前位置:网站首页>Pgadmin4 of PostgreSQL graphical interface tool
Pgadmin4 of PostgreSQL graphical interface tool
2022-07-07 02:22:00 【Hua Weiyun】

1、 brief introduction
Open source database PostgreSQL Graphics management tools commonly used are Navicat, besides , We also have PostgreSQL It comes with itself pgAdmin4, More professional .
Navicat The interface of :

pgAdmin4 The interface of :

pgAdmin4 Open source database PostgreSQL Graphics management tools for , Is a desktop graphics management tool pgAdmin3 Rewriting of , follow PostgreSQL agreement It's open source. 、 free 、 Commercially available .pgAdmin4 yes python Developed web Applications , It can be deployed as web Mode is accessed through the browser , It can also be deployed to run independently in desktop mode .
download :https://www.pgadmin.org/download/

2、Windows install
download :https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v5.1/windows/pgadmin4-5.1-x64.exe
Installation is the next step. The next step is .
in addition , If we install Windows Version of PostgreSQL database , By default, it also comes with the installation directory pgAdmin4 Tools :

During installation, you can also choose :
3、docker install pgAdmin4
If we don't want to install locally , Then you can also use the server directly docker Version of pgAdmin4.
Official website :https://hub.docker.com/r/dpage/pgadmin4/
Detailed configuration :https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html
-- download docker pull dpage/pgadmin4:latest-- install docker run -p 680:80 \ -e '[email protected]' \ -e 'PGADMIN_DEFAULT_PASSWORD=lhr' \ -d dpage/pgadmin4 -- Sign in http://192.168.66.35:680
You can see , Web version of pgAdmin4 It has the same function as the desktop version .
4、 Sinicization pgAdmin4







The latest version used by Mr. Mai here :

5、 Use pgAdmin4
5.1、 insert data



or :

This method is also possible , But you have to determine the table before !!
View the added data ;


5.2、 Use insert The query tool inserts multiple pieces of data
INSERT INTO STUDENT2( ID,NAME,SUBJECTS) VALUES (2,' Go to ','c'),(3,' open ','m'), (4,' God ','x');
View the data :

5.3、 Use select Query data



Use the query statement to query the table
SELECT id,name FROM STUDENT2;

5.4、 Use update Update the database


Put the value in “?” The place of And finish WHERE Conditions <condition>, And then click “ perform ” Button to execute the query .
for example , hold id yes 2 Of , Change name and subjects:

The result of the query change :

5.5、 Use delete Delete data




A statement that deletes the entire table :
DELETE FROM public.student2;


5.6、 The question of sequencing
PostgreSQL ORDER BY Clause is used to sort data in ascending or descending order . Data is sorted on the basis of one or more columns . grammar :SELECT column-list FROM table_name [WHERE condition] [ORDER BY column1, column2, .. columnN] [ASC | DESC];SQL Parameter description :column_list: It specifies the column or calculation to retrieve .table_name: It specifies the table from which to retrieve records .FROM Clause must have at least one table .WHERE conditions: Optional . It stipulates that conditions must be met to retrieve records .ASC: Also optional . It sorts the result set in ascending order by expression ( Default , If no modifier is a provider ).DESC: Also optional . It sorts the result set in order by expression .
①、 Ascending sort - ORDER BY [field] ASC
Execute the following query in ascending order ORDER BY AGE Data records :
SELECT * FROM STUDENT2 ORDER BY NAME ASC;according to name Sort fields in ascending order :

②、 null - ORDER BY [field] DESC
Execute the following query in descending order ORDER BY name DESC Record of data :
SELECT * FROM STUDENT2 ORDER BY subjects DESC;according to subjects Sort fields in descending order ,

③、 Multi column sorting ORDER BY
You can also use it ORDER BY Clause sorts records on multiple columns . Execute the following query from the table “student2” Press ORDER BY NAME Get records in ascending order .

5.7、 The problem of grouping
PostgreSQL GROUP BY Clause is used to group these rows together in a table with the same data . It is associated with SELECT Statement together .GROUP BY Clause collects data from multiple records , And group the results into one or more columns . It is also used to reduce redundancy in the output . grammar :SELECT column-listFROM table_nameWHERE [conditions ]GROUP BY column1, column2....columnNORDER BY column1, column2....columnNSQL Be careful : stay GROUP BY In the case of multiple columns , When grouping any columns you use , Make sure these columns are available in the list .
SELECT NAMEFROM STUDENT2 GROUP BY NAME;
Reduce redundant data
We can add some duplicate data in the table first , When we use GROUP BY NAME when , You can see that duplicate name data records are merged . It specifies GROUP BY Reduce redundant .
5.8、HAVING Usage of
stay PostgreSQL in ,HAVING Clause and GROUP BY Clauses are combined to use , Used to select a specific line where the result of the function satisfies certain conditions . grammar :SELECT column1, column2 FROM table1, table2 WHERE [ conditions ] GROUP BY column1, column2 HAVING [ conditions ] ORDER BY column1, column2
①、name The field value count is greater than 1 The name of .
SELECT NAME,COUNT (NAME) FROM STUDENT2 GROUP BY NAME HAVING COUNT (NAME) > 1;Because in the past , open , Every day is double data inserted ;


②、 The display name (name) Quantity less than 2 The record of .
SELECT NAME FROM STUDENT2 GROUP BY NAME HAVING COUNT (NAME) < 2;
边栏推荐
- Stm32f4 --- general timer update interrupt
- ZABBIX 5.0: automatically monitor Alibaba cloud RDS through LLD
- freeswitch拨打分机号源代码跟踪
- Flir Blackfly S工业相机:颜色校正讲解及配置与代码设置方法
- 【论文阅读|深读】 GraphSAGE:Inductive Representation Learning on Large Graphs
- Blackfly s usb3 industrial camera: buffer processing
- Integrated navigation: product description and interface description of zhonghaida inav2
- Vingt - trois mille feuilles? "Yang mou" derrière l'explosion de la consommation végétale
- Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
- 解密函数计算异步任务能力之「任务的状态及生命周期管理」
猜你喜欢

张平安:加快云上数字创新,共建产业智慧生态

使用Ceres进行slam必须要弄清楚的几个类和函数

如何从0到1构建32Core树莓派集群

STM32F4---PWM输出

TiFlash 源码阅读(四)TiFlash DDL 模块设计及实现分析

Time synchronization of livox lidar hardware -- PPS method

How can reinforcement learning be used in medical imaging? A review of Emory University's latest "reinforcement learning medical image analysis", which expounds the latest RL medical image analysis co
![[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files](/img/20/f7fc2204ca165dcea4af25cb054e9b.png)
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files

The GPG keys listed for the "MySQL 8.0 community server" repository are already ins

【论文阅读|深读】ANRL: Attributed Network Representation Learning via Deep Neural Networks
随机推荐
机器人队伍学习方法,实现8.8倍的人力回报
4--新唐nuc980 挂载initramfs nfs文件系统
Command injection of cisp-pte
[paper reading | deep reading] rolne: improving the quality of network embedding with structural role proximity
大咖云集|NextArch基金会云开发Meetup来啦!
阿里云中间件开源往事
张平安:加快云上数字创新,共建产业智慧生态
Robot team learning method to achieve 8.8 times human return
6 seconds to understand the book to the Kindle
FLIR blackfly s usb3 industrial camera: how to use counters and timers
GEE升级,可以实现一件run tasks
Several classes and functions that must be clarified when using Ceres to slam
The last line of defense of cloud primary mixing department: node waterline design
Web开发小妙招:巧用ThreadLocal规避层层传值
强化学习如何用于医学影像?埃默里大学最新《强化学习医学影像分析》综述,阐述最新RL医学影像分析概念、应用、挑战与未来方向
Why am I warned that the 'CMAKE_ TOOLCHAIN_ FILE' variable is not used by the project?
How do I dump SoapClient requests for debugging- How to dump SoapClient request for debug?
How to use strings as speed templates- How to use String as Velocity Template?
Flir Blackfly S USB3 工业相机:白平衡设置方法
#夏日挑战赛#数据库学霸笔记(下)~