如何在postgresql中获取point类型变量的坐标
如何在postgresql中获得point类型变量的坐标
在postgresql中获得point类型变量坐标的方法:1.启动postgresql服务;2.登录postgresql数据库;3.使用数据库;4.在数据库新建表;5.履行命令获得坐标;
具体步骤以下:
1.首先,在命令行中启动postgresql服务;
net start postgresql
2.postgresql服务启动后,在命令行中登录到postgresql数据库;
psql -h -U
3.登录到postgresql数据库后,在postgresql选择一个数据库并使用;
\c text
4.进入到数据库后,在数据库中新建一个数据表;
create table text;
5.最后,数据表新建好后,在数据表中履行以下命令便可获得point类型变量的x、y坐标;
select (point(1,2))[0] as x, (point(1,2))[1] as y
文章来源:丸子建站
文章标题:如何在postgresql中获取point类型变量的坐标
https://www.wanzijz.com/view/2908.html