当前位置:网站首页>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....columnN
SQL 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;
边栏推荐
- MFC Windows 程序设计[147]之ODBC数据库连接(附源码)
- Freeswitch dials extension number source code tracking
- GEE升级,可以实现一件run tasks
- Schedulx v1.4.0 and SaaS versions are released, and you can experience the advanced functions of cost reduction and efficiency increase for free!
- Yyds dry goods inventory # solve the real problem of famous enterprises: maximum difference
- 企业中台建设新路径——低代码平台
- Detailed explanation of line segment tree (including tested code implementation)
- RC振荡器和晶体振荡器简介
- XML to map tool class xmlmaputils (tool class V)
- 【论文阅读|深读】 GraphSAGE:Inductive Representation Learning on Large Graphs
猜你喜欢
The last line of defense of cloud primary mixing department: node waterline design
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
[paper reading | deep reading] rolne: improving the quality of network embedding with structural role proximity
【论文阅读|深读】DNGR:Deep Neural Networks for Learning Graph Representations
Lumion 11.0 software installation package download and installation tutorial
将截断字符串或二进制数据
Centros 8 installation MySQL Error: The gpg Keys listed for the "MySQL 8.0 Community Server" repository are already ins
The GPG keys listed for the "MySQL 8.0 community server" repository are already ins
红外相机:巨哥红外MAG32产品介绍
Lidar: introduction and usage of ouster OS
随机推荐
张平安:加快云上数字创新,共建产业智慧生态
遇到慢SQL该怎么办?(下)
3D激光SLAM:Livox激光雷达硬件时间同步
FLIR blackfly s usb3 industrial camera: how to use counters and timers
String or binary data will be truncated
FLIR blackfly s industrial camera: explanation and configuration of color correction and code setting method
一片叶子两三万?植物消费爆火背后的“阳谋”
建议收藏!!Flutter状态管理插件哪家强?请看岛上码农的排行榜!
Robot team learning method to achieve 8.8 times human return
[paper reading | deep reading] anrl: attributed network representation learning via deep neural networks
postgresql 之 数据目录内部结构 简介
使用Ceres进行slam必须要弄清楚的几个类和函数
Flir Blackfly S 工业相机:自动曝光配置及代码
MySQL execution process and sequence
GEE升级,可以实现一件run tasks
Unicode string converted to Chinese character decodeunicode utils (tool class II)
Big guys gather | nextarch foundation cloud development meetup is coming!
张平安:加快云上数字创新,共建产业智慧生态
Seconds understand the delay and timing function of wechat applet
Sensor: introduction of soil moisture sensor (xh-m214) and STM32 drive code