Tag Info

Hot answers tagged


In Postgres column and table names are not case sensitive and everything is converted to lower case before executing the query, see the docs. Therefore, SELECT SomeColumn FROM SomeTable becomes SELECT somecolumn FROM sometable unless you write it as SELECT "SomeColumn" FROM "SomeTable" In my view this is messy, especially when dealing with SQL ...


The alternative is the use an AND/OR statement: "Column_Name" = 'Value_1' OR "Column_Name" = 'Value_2'


One method is to use the IN function followed by your list of values all inside brackets. E.g. "Column_Name" IN ('Value_1', 'Value_2', 'Value_N') Hope this helps!

Only top voted, non community-wiki answers of a minimum length are eligible