-
Arrange Date Week Wise
How to arrange date in week wise like from Monday to Sunday?
-
Analytical Function
WE using Last_value()analytical function but the result do not match according to me?
-
Base table of View table
How do we view the query used while creating a View table? i.e How to find the dependencies of a view table.
-
Securing SQL Scripts
How to secure SQL scripts so that they cannot be seen by others but can only be executed.
-
LOCK Query
What is use of lock query in SQL Plus? Give its syntax and implementation?
-
SELECT Statement in CASE
How to use select statement in Case?
-
Ref Cursors
How many ref cursors can be dynamically opened in stored procedures for a session?
-
SQL Soundx
What is soundx in SQL?
-
SQL System Time
How to get System time in SQL?
-
Change Default Display
How to change the default display? For deptno 10 show "Financial Department", for deptno 20 show "Account Department", for deptno 30 show "Management Information System", for deptno 40 show "Electronic Data Processing"
-
Number of Constraints
How to count the number of constraints on a given table?
-
Aggregation Key
What is the Aggregation Key?
-
Create Index
How Create Index in Oracle? explain with example
-
Oracle query performance
A) I have 100 columns in emp table , which of the below queries will give good performance and WHY?1) Select * from emp;2)select col1,col2,col3,..............col100 from emp;B) we have 2 tables T1(100 records) and T2(1000) recordsWhen we use the below queries , it will generate Cartesian product , which query will give better performance and WHY?1)Selct * from t1,t2 ;2)select * from t2,t1;
-
SQL Query to retrieve columns having a particular character
Table StructureID Name Salary1 Pratap 15002 Gayathri 25003 Anita 3000 4 Ram.C 4500Write a query to retrieve names which have the letter R in it irrespective of the case(small or caps).Output:ID Name Salary1 Pratap 15002 Gayathri 25004 Ram.C 4500
-
Case and decode
can anyone help with a simple example of converting one from other like CASE to DECODE or DECODE to CASE.
-
Outer Join
When will we use outer join? Explain with example
-
What is a cursor?
Oracle uses work area to execute SQL statements and store processing information PL/SQL construct called a cursor lets you name a work area and access its stored information A cursor is a mechanism used to fetch more than one row in a Pl/SQl block.
-
Difference between NO DATA FOUND and %NOTFOUND
NO DATA FOUND is an exception raised only for the SELECT....INTO statements when the where clause of the querydoes not match any rows. When the where clause of the explicit cursor does not match any rows the %NOTFOUND attribute is set to TRUE instead.
-
What WHERE CURRENT OF clause does in a cursor?
LOOPSELECT num_credits INTO v_numcredits FROM classesWHERE dept=123 and course=101;UPDATE studentsSET current_credits=current_credits+v_numcreditsWHERE CURRENT OF X;END LOOPCOMMIT;END;
Oracle SQL Interview Questions
Ans