Reputation: 39
I have a search page where for null values I use NVL for null conditions. But for one field I have to do a wildcard search. Is nvl possible with wildcard search eg. NVL(null,%name%)?
Upvotes: 1
Views: 605
Reputation: 1
select * from your_table where column_name like NVL('%name%',column_name)
Upvotes: 0
Reputation: 2703
You can use NVL in this case only as "subfunction"
If you want get also null-s results do it like this:
SELECT anything
FROM your_table
WHERE NVL(column_can_be_null, 'substring_you_search_for')
LIKE '%substring_you_search_for%'
Upvotes: 2