-1

i can't find solution on internet of that problem, everything what i got is connected with wildcard, and i don't wanna to use wildcard in my case

i want to find all tables that have ending '_N' so im trying to execute something like that

select * from dba_tables v
where v.table_name like '%_N';

but '' wildcard means that search all tables with name [can be everything][need to be some character]N i just want to use that '' i want to have all tables with '_N' ending, so for example tables like 'EXAMPLE_N' 'HELP_ME_N'.

How can i not use '_' wildcard?

Potato
  • 172
  • 1
  • 12

3 Answers3

0

You can use escape:

where v.table_name like '%$_N' escape $

The default escape character is \:

where v.table_name like '%\_N';

That works as well.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
0

You could escape '_' using \

select * from table  
where table_name.column_name like '%\_N';
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
0

you can also use this:

select * from dba_tables v
where regexp_like(v.table_name,'.*_N$');
Nikhil S
  • 3,786
  • 4
  • 18
  • 32