f
Oracle like 及 in 的結合 -- regexp_like ~ 迪貝之家
skip to main |
skip to sidebar
select substr(address,1,7) |
from urtb |
where regexp_like(address , '台北市|台北縣') |
select substr(address,1,7) |
from urtb |
where not regexp_like(address , '台北市|台北縣') |
set serveroutput on |
declare |
string_pattern nvarchar2(200) := '台北市|台北縣|'; |
begin |
string_pattern := rtrim(string_pattern,'|'); |
dbms_output.put_line(string_pattern); |
for i in ( |
select count(*) cnt from urtb where not regexp_like(address , string_pattern) |
) |
loop |
dbms_output.put_line(i.cnt); |
end loop; |
end; |
/ |