How can I put an sql query result in a string array with Postgres?
I have some attributes in the column 'zone' of the table 'mytable' and I must put them all in a String[] areas;
This is my first request, sorry if I made some format mistake.
Take the 2-minute tour
×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
|
||||
You can use an array constructor:
|
|||||||||||||
|
String[]
is not a valid Postgres type. I suppose you meantext[]
? And do you want to aggregate all attributes from all rows into one array or just attributes from one row? – Erwin Brandstetter May 7 at 0:00