1.
How WITH clause helps in simplifying complex SQL’s?
Answer: Click here
2.
What is the difference between %TYPE and %ROWTYPE?
Answer: Click here
3.
What is the difference between Primary Key and Unique Key?
Answer: Click here
4.
How to pass comma separated values to IN operator?
Answer: Click here
5.
What are different ways to change column values into comma separated? How do we
achieve this with and without using LISTAGG analytical function?
Answer: Click here
6.
How can we return a record set from a Function?
Answer: Click here
7.
How to compare structure of two different tables?
Answer: Click here
8.
How to handle Exception while processing MERGE statement? What is DML Error
Logging in ORACLE? How to handle exceptions if any error occurs in between DML
operations?
Answer: Click here
9.
What are different ways of normalizing DB Tables?
Answer: Click here
10. If marks column contains the comma separated values
from Student table. How to calculate the count of that comma separated values?
Student_Name
|
Marks
|
Amit
|
30,130,20,4
|
Sumit
|
100,20,30
|
Puneet
|
140,10
|
Want to display output like:
Student Name
|
Marks Count
|
Amit
|
4
|
Sumit
|
3
|
Puneet
|
2
|
Answer:
Select Student_Name, REGEXP_COUNT
(marks,’,’) + As “Marks Count” from Student;
No comments:
Post a Comment