Answers for "sql wild card"

SQL
1

wildcard in sql

SELECT * FROM table_name WHERE UPPER(col_name) LIKE '%SEARCHED%';
SELECT * FROM table_name WHERE col_name LIKE '%Searched%';  -- Case sensitive

SYMBOL	DESCRIPTION	(SQL)                       EXAMPLE
%	    zero or more characters	                bl%      'bl, black, blue, blob'
_	    a single character	                    h_t      'hot, hat, hit'
[]	    any single character within brackets	h[oa]t   'hot, hat', but NOT 'hit'
^	    any character not in the brackets	    h[^oa]t  'hit', but NOT 'hot, hat'
-	    a range of characters	                c[a-b]t   'cat, cbt'
Posted by: Guest on September-10-2021
1

sql like

eturns true if the operand value matches a pattern.
Example: Returns true if the user’s first_name ends with ‘son’.
SELECT * FROM users
WHERE first_name LIKE '%son';
Posted by: Guest on January-07-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language