How to properly use plain SQL code in Postgresql?

39 views Asked by At

I'm using pgadmin right now and this is the table I created. I'm trying to convert this wkb_geometry column into lat,lon geometry point.

When I tried to select this column and declare it as a variable so I can perform some conversion on it, I failed to do so by using plain SQL code such as "DECLARE @xxx VarChar". I looked it up and did see that plain SQL code doesn't always work in Postgres but haven't found a solution yet. Could someone point me a way to do it? Thank you so much!!

0

There are 0 answers