当前位置:网站首页>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;
边栏推荐
- 传感器:DS1302时钟芯片及驱动代码
- 【Unity】升级版·Excel数据解析,自动创建对应C#类,自动创建ScriptableObject生成类,自动序列化Asset文件
- Vingt - trois mille feuilles? "Yang mou" derrière l'explosion de la consommation végétale
- 3D激光SLAM:Livox激光雷达硬件时间同步
- 处理streamlit库上传的图片文件
- 4--新唐nuc980 挂载initramfs nfs文件系统
- Command injection of cisp-pte
- go swagger使用
- [C # notes] reading and writing of the contents of text files
- Several classes and functions that must be clarified when using Ceres to slam
猜你喜欢
一片葉子兩三萬?植物消費爆火背後的“陽謀”
建議收藏!!Flutter狀態管理插件哪家强?請看島上碼農的排行榜!
#夏日挑战赛#数据库学霸笔记(下)~
【论文阅读|深读】DNGR:Deep Neural Networks for Learning Graph Representations
Time synchronization of livox lidar hardware -- PPS method
红外相机:巨哥红外MAG32产品介绍
The mega version model of dall-e MINI has been released and is open for download
大咖云集|NextArch基金会云开发Meetup来啦!
A new path for enterprise mid Platform Construction -- low code platform
FLIR blackfly s industrial camera: explanation and configuration of color correction and code setting method
随机推荐
[C # notes] use file stream to copy files
Robot team learning method to achieve 8.8 times human return
Blackfly s usb3 industrial camera: buffer processing
Seconds understand the delay and timing function of wechat applet
Metaforce force meta universe development and construction - fossage 2.0 system development
低代码平台中的数据连接方式(上)
Redis configuration class redisconfig
postgresql 之 数据目录内部结构 简介
【论文阅读|深读】RolNE: Improving the Quality of Network Embedding with Structural Role Proximity
FLIR blackfly s industrial camera: auto exposure configuration and code
STM32项目 -- 选题分享(部分)
【服务器数据恢复】raid损坏导致戴尔某型号服务器崩溃的数据恢复案例
Processing image files uploaded by streamlit Library
Big guys gather | nextarch foundation cloud development meetup is coming!
postgresql之整体查询大致过程
Freeswitch dials extension number source code tracking
go swagger使用
Halcon knowledge: segment_ contours_ XLD operator
纽约大学 CITIES 研究中心招聘理学硕士和博士后
Schedulx v1.4.0 and SaaS versions are released, and you can experience the advanced functions of cost reduction and efficiency increase for free!