1SELECT * FROM table_name WHERE UPPER(col_name) LIKE '%SEARCHED%';
2SELECT * FROM table_name WHERE col_name LIKE '%Searched%'; -- Case sensitive
3
4SYMBOL DESCRIPTION (SQL) EXAMPLE
5% zero or more characters bl% 'bl, black, blue, blob'
6_ a single character h_t 'hot, hat, hit'
7[] any single character within brackets h[oa]t 'hot, hat', but NOT 'hit'
8^ any character not in the brackets h[^oa]t 'hit', but NOT 'hot, hat'
9- a range of characters [a-b]t 'cat, cbt'
1-- Postgresql case insensitive:
2SELECT * FROM people WHERE name ILIKE 'JOHN'
3-- John
4-- JOHN
5-- john
1SELECT 1
2FROM dbo.Customers
3WHERE CustID = @CustID COLLATE SQL_Latin1_General_CP1_CS_AS
4 AND CustPassword = @CustPassword COLLATE SQL_Latin1_General_CP1_CS_AS
5
1SELECT DISTINCT COL_NAME FROM myTable WHERE UPPER(COL_NAME) LIKE UPPER('%PriceOrder%')
2# or
3SELECT DISTINCT COL_NAME FROM myTable WHERE LOWER(COL_NAME) LIKE LOWER('%PriceOrder%')
4