Search the Reference Library pages:  

Oracle Wildcards
Version 11.1
 
Demo Table And Records
Demo Data CREATE TABLE wildcard (
test VARCHAR2(25));

INSERT INTO wildcard VALUES ('23%45');
INSERT INTO wildcard VALUES ('2345');
INSERT INTO wildcard VALUES ('2365');
INSERT INTO wildcard VALUES ('Daniel Morgan');
INSERT INTO wildcard VALUES ('Washington');
COMMIT;
 
Wildcard Characters
Single Character

_ (underscore)

SELECT *
FROM wildcard
WHERE test LIKE '23_5';
Multiple Characters  
SELECT *
FROM wildcard
WHERE test LIKE '2%5';
Mixed Single And Multiple Characters SELECT *
FROM wildcard
WHERE test LIKE '_3%5';
Complex Statement SELECT *
FROM wildcard
WHERE test LIKE '%a%a %';
 
Querying Records Containing Wildcards
Find Records Containing Percentage Sign ESCAPE '<escape_character>'
SELECT *
FROM wildcard
WHERE test LIKE '%\%%' ESCAPE '\';
 
Related Topics
Delete
Insert
Select
Update
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us    © 2003 - 2024 psoug.org
-----