Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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'
Comment

_ Wildcard in SQL

SELECT *
FROM Customers
WHERE country LIKE 'U_';
Comment

[] Wildcard in SQL

SELECT *
FROM Customers
WHERE country LIKE 'U[KA]%';
Comment

! Wildcard in SQL

SELECT *
FROM Customers
WHERE last_name LIKE '[!DR]%';
Comment

% Wildcard in SQL

SELECT *
FROM Customers
WHERE last_name LIKE 'R%';
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle grant create job 
Sql :: localhost ERROR 2006 (HY000) at line 1163: MySQL server has gone away 
Sql :: write sql query to show the details start from digit 
Sql :: insert into database items linq2sql 
Sql :: java nosql sort 
Sql :: adding primery key constraint to a column 
Sql :: get last query in codeigniter 4 
Sql :: trigger vérifier stock 
Sql :: mysql edit trigger 
Sql :: can you create views in dbbrowser 
Sql :: drop tables from local table database postgres 
Sql :: how to use mysql_tzinfo_to_sql on windows 
Sql :: sql server setup commands 
Sql :: list foreign user mapping postgres 
Sql :: Monthly Birthday SQL Query 
Sql :: oserror mysql_config not found virtualenv 
Sql :: hibernate xml property MySQL url, username and password 
Sql :: sql find record cannot cast date 
Sql :: edit shchima table in sql 
Sql :: phone number data type in sql 
Sql :: Bigquery insert issue 
Sql :: ! Wildcard in SQL 
Sql :: ora 00001 in oracle 
Sql :: in operator in sql 
Sql :: How to display top 50 rows? 
Sql :: oracle sql first day of quarter 
Sql :: sql replace id with name from another table 
Sql :: raven ql select count 
Csharp :: c# delete file if exists 
Csharp :: c# string equals ignore case 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =