You want to check equality or do a regular expression search but ignoring case
Either use lower() on the field and the value being compared or use the ILIKE or ˜˜* regular expression operators ref.
If you want to do a simple comparison of a text field use the lower() or upper() functions:
SELECT * FROM companies WHERE lower('Archonet')=lower(co_name);
|
If you want to do a case-insensitive wildcard match use the ILIKE keyword or ˜˜* operator:
SELECT * FROM companies WHERE co_name ILIKE 'Arc%'; |
Note that both ILIKE and ˜˜* are locale-dependent and are Postgres-specific.