-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
  • 163
  • 1
  • 10

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,198,228
  • 53
  • 572
  • 709
0

You could escape '_' using \

select * from table  
where table_name.column_name like '%\_N';
ScaisEdge
  • 129,293
  • 10
  • 87
  • 97
0

you can also use this:

select * from dba_tables v
where regexp_like(v.table_name,'.*_N$');
nikhil sugandh
  • 3,422
  • 4
  • 16
  • 29