Q:

Comparing upper and lowercase letters

In SQL, does 'A' = 'a'? 
I took results that I downloaded using sql, the values in two columns matched but they were not supposed to. When I tried to look for a difference, the only difference were capitalized letters in the middle of the word.
Is there a way to make SQL case insensitive? For example THERE is equal to There which is also equal to there or thERE?

A:

Use LOWER function to convert the strings to lower case before comparing.
like this :
SELECT *
  FROM tableName
 WHERE LOWER(columnName)='a'

using ILIKE instead of LIKE
SELECT * FROM tablename WHERE columnName ILIKE 'a'

