William Falcon
William Falcon

Reputation: 9823

postgres Join 2 cols into 1

Want to join lat lon into 1. How is this done without the () in the results?

select name, (lat, lng)  as coords from my_table

But this prints:

name      coords    
a         (,)    
b         ( 122, 333)  

I need:

name     coords    
a        122, 333    

Upvotes: 0

Views: 23

Answers (1)

Gurwinder Singh
Gurwinder Singh

Reputation: 39537

Is this what you need?

select name, lat|| ', ' || lng as coords from my_table

Upvotes: 2

Related Questions