Combine length and translate : LENGTH « Char Functions « Oracle PL / SQL






Combine length and translate

 
SQL>
SQL> select length(
  2             translate('how many consonants are there?',
  3                       'bcdfghjklmnpqrstvwxzaeiouy? ',
  4                       'bcdfghjklmnpqrstvwxz')
  5           ) "# of consonants"
  6  from dual
  7  /
# of consonants
---------------
             15

1 row selected.

SQL>
SQL> --

 








Related examples in the same category

1.LENGTH: return the length of a string value, a numeric value
2.length with null value
3.use Length function in where statement