select query on postgis not working for specific fields So I have what seems to be a really weird problem.

I have imported a table from QGIS into a postgresql + postgis database. 
I simply want to select a few columns from that, but I can't. 

whats funny is that i can use the select query for the lowercase fields and it works, but not for the uppercase ones, such as LABELRANK. the error shows that such a column does not exist.

why is that so?
Probably this columns names has been created using double-quotes.

You should use double-quotes in your SELECT statement.




create table tbl (field1 int, "FIELD2" int, field3 int);






insert into tbl values (1,2,3),(4,5,6);






select field1, field2, field3 from tbl;



ERROR:  column &quot;field2&quot; does not exist
LINE 1: select field1, field2, field3 from tbl;
                       ^
HINT:  Perhaps you meant to reference the column &quot;tbl.field1&quot; or the column &quot;tbl.field3&quot;.







select field1, "FIELD2", field3 from tbl;



field1 | FIELD2 | field3
-----: | -----: | -----:
     1 |      2 |      3
     4 |      5 |      6



db&lt;>fiddle here