My psql table structure like below:
id userName gender
1 xxxx Male
if I am using query like below from psql shell:
select * from table where userName="xxx";
It gives error: Error: column "userName" does not exists.
How can I query if column name contain with camelCase.
All identifiers are converted to lower case in postgres. To use upper case identifiers you should use double quotes around identifier to say postgres to not convert it to lower case :
select * from table where "userName" = 'xxx';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With