how to count characters in string

regexp_count fonksiyonu belirttiğiniz string kadar içerisinden hangi

karakterden kaç adet olduğunu öğrenmenize yardımcı olur.

SELECT

regexp_count(‘a,a,b,b,c,c,d,d,e,a,a,b,d,c’,’a’) a_count,
regexp_count(‘a,a,b,b,c,c,d,d,e,a,a,b,d,c’,’b’) b_count,
regexp_count(‘a,a,b,b,c,c,d,d,e,a,a,b,d,c’,’c’) c_count,
regexp_count(‘a,a,b,b,c,c,d,d,e,a,a,b,d,c’,’d’) d_count,
regexp_count(‘a,a,b,b,c,c,d,d,e,a,a,b,d,c’,’e’) e_count

FROM dual;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: