Prerequisite – PL/SQL introduction
In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations.
Given a string and the task is to find the number of vowels and consonants present in the string.
Input: str = 'Ramesh' Output: Vowels = 2, Consonants = 4 Input: str = 'Ramesh is a Geek' Output: Vowels = 6, Consonants = 7
Approach is to consider a character one by one and maintain a separate count for both vowels and consonants.
Below is the required implementation:
No. of Vowels: 6 No. of Consonants: 7
- PLSQL : || Operator
- Difference between SQL and PLSQL
- PLSQL | CHR Function
- PLSQL | ABS Function
- PLSQL | LPAD Function
- PLSQL | NCHR Function
- PLSQL | ASCIISTR Function
- PLSQL | LTRIM Function
- PLSQL | INSTRC Function
- PLSQL | CONCAT Function
- PLSQL | COMPOSE Function
- PLSQL | SUBSTR Function
- PLSQL | LENGTHC Function
- PLSQL | DECOMPOSE Function
- PLSQL | DUMP Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.