the count of that comma separated values?
Student Name Marks
Dinesh 30,130,20,4
Kumar 100,20,30
Follow Me : https://www.youtube.com/c/SauravAgarwal
Sonali 140,10
Select Student_name, regexp_count (marks,’,’) + As “Marks Count” from Student;
91. What is query to fetch last day of previous month in oracle?
Select LAST_DAY (ADD_MONTHS (SYSDATE,-1)) from dual;
92. How to display the String vertically in Oracle?
SELECT SUBSTR (‘AMIET’, LEVEL, 1) FROM dual Connect by level <= length (‘AMIET’);
93. How to display departmentwise and monthwise maximum salary?
Select Department_no, TO_CHAR (Hire_date,’Mon’) as Month from Employee group by
Department_no, TO_CHAR (Hire_date,’mon’);
94. How to calculate number of rows in table without using count function?
Select table_name, num_rows from user_tables where table_name=’Employee’;
Tip: User needs to use the system tables for the same. So using user_tables user will get the number of
rows in the table
95. How to fetch common records from two different tables which has not any joining condition
?
Select * from Table1
Intersect
Select * from Table2;
96. Explain Execution Plan.?
Query optimizer is a part of SQL server that models the way in which the relational DB engine works
and comes up with the most optimal way to execute a query. Query Optimizer takes into account
amount of resources used, I/O and CPU processing time etc. to generate a plan that will allow query
to execute in most efficient and faster manner. This is known as EXECUTION PLAN.
Optimizer evaluates a number of plans available before choosing the best and faster on available.
Every query has an execution plan.
Definition by the mod: Execution Plan is a plan to execute a query with the most optimal way which
is generated by Query Optimizer. Query Optimizer analyzes statistics, resources used, I/O and CPU
processing time and etc. and comes up with a number of plans. Then it evaluates those plans and the
most optimized plan out of the plans is Execution Plan. It is shown to users as a graphical flow chart
that should be read from right to left and top to bottom.
Do'stlaringiz bilan baham: |