当前位置:网站首页>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;
边栏推荐
- Metaforce force meta universe development and construction - fossage 2.0 system development
- 云原生混部最后一道防线:节点水位线设计
- [xlua notes] array of lua to array of C #
- 建議收藏!!Flutter狀態管理插件哪家强?請看島上碼農的排行榜!
- 建议收藏!!Flutter状态管理插件哪家强?请看岛上码农的排行榜!
- Halcon knowledge: segment_ contours_ XLD operator
- Time synchronization of livox lidar hardware -- PPS method
- 3D laser slam: time synchronization of livox lidar hardware
- Zabbix 5.0:通过LLD方式自动化监控阿里云RDS
- centos8安裝mysql報錯:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
猜你喜欢

【服务器数据恢复】raid损坏导致戴尔某型号服务器崩溃的数据恢复案例

SchedulX V1.4.0及SaaS版发布,免费体验降本增效高级功能!

leetcode:5. 最长回文子串【dp + 抓着超时的尾巴】

Lidar: introduction and usage of ouster OS

Web3的先锋兵:虚拟人

Centos8 install MySQL 8.0 using yum x

压缩 js 代码就用 terser

激光雷达:Ouster OS产品介绍及使用方法

Robot team learning method to achieve 8.8 times human return

Flir Blackfly S 工业相机:配置多个摄像头进行同步拍摄
随机推荐
[xlua notes] array of lua to array of C #
Introduction to FLIR blackfly s industrial camera
Cat recycling bin
Integrated navigation: product description and interface description of zhonghaida inav2
centos8安裝mysql報錯:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
3D激光SLAM:Livox激光雷达硬件时间同步
String or binary data will be truncated
Sensor: introduction of soil moisture sensor (xh-m214) and STM32 drive code
leetcode:736. Lisp 语法解析【花里胡哨 + 栈 + 状态enumaotu + slots】
A new path for enterprise mid Platform Construction -- low code platform
传感器:土壤湿度传感器(XH-M214)介绍及stm32驱动代码
Jacob Steinhardt, assistant professor of UC Berkeley, predicts AI benchmark performance: AI has made faster progress in fields such as mathematics than expected, but the progress of robustness benchma
STM32F4---通用定时器更新中断
STM32F4---PWM输出
[unity notes] screen coordinates to ugui coordinates
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
Twenty or thirty thousand a leaf? "Yang Mou" behind the explosion of plant consumption
Word wrap when flex exceeds width
【森城市】GIS数据漫谈(二)
Schedulx v1.4.0 and SaaS versions are released, and you can experience the advanced functions of cost reduction and efficiency increase for free!