当前位置:网站首页>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;
边栏推荐
- Sensor: introduction of soil moisture sensor (xh-m214) and STM32 drive code
- 豆瓣平均 9.x,分布式领域的 5 本神书!
- 机器人队伍学习方法,实现8.8倍的人力回报
- Detailed explanation of line segment tree (including tested code implementation)
- Flir Blackfly S 工业相机 介绍
- Lumion 11.0软件安装包下载及安装教程
- 阿里云易立:云原生如何破解企业降本提效难题?
- FLIR blackfly s industrial camera: synchronous shooting of multiple cameras through external trigger
- FLIR blackfly s industrial camera: explanation and configuration of color correction and code setting method
- 解密函数计算异步任务能力之「任务的状态及生命周期管理」
猜你喜欢
建议收藏!!Flutter状态管理插件哪家强?请看岛上码农的排行榜!
postgresql之整体查询大致过程
The last line of defense of cloud primary mixing department: node waterline design
UC伯克利助理教授Jacob Steinhardt预测AI基准性能:AI在数学等领域的进展比预想要快,但鲁棒性基准性能进展较慢
Introduction to microservice architecture
企业中台建设新路径——低代码平台
张平安:加快云上数字创新,共建产业智慧生态
Collection recommandée!! Quel plug - in de gestion d'état flutter est le plus fort? Regardez le classement des manons de l'île, s'il vous plaît!
Stm32f4 --- general timer update interrupt
Processus général de requête pour PostgreSQL
随机推荐
Web开发小妙招:巧用ThreadLocal规避层层传值
使用Ceres进行slam必须要弄清楚的几个类和函数
PostgreSQL图形化界面工具之pgAdmin4
【论文阅读|深读】 GraphSAGE:Inductive Representation Learning on Large Graphs
Flir Blackfly S 工业相机:配置多个摄像头进行同步拍摄
Several classes and functions that must be clarified when using Ceres to slam
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
Blackfly s usb3 industrial camera: buffer processing
一片葉子兩三萬?植物消費爆火背後的“陽謀”
Zabbix 5.0:通过LLD方式自动化监控阿里云RDS
Processus général de requête pour PostgreSQL
Threadlocalutils (tool class IV)
MySQL execution process and sequence
Redis configuration class redisconfig
Infrared camera: juge infrared mag32 product introduction
Processing image files uploaded by streamlit Library
【LeetCode】Day97-移除链表元素
Recent applet development records
Halcon实例转OpenCvSharp(C# OpenCV)实现--瓶口缺陷检测(附源码)
String or binary data will be truncated