-
Find out nth highest salary from emp table
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal < = b.sal);For Eg:-Enter value for n: 2SAL---------3700
-
Replace Only Third Character with *
How to replace only third character of employees name with * from employee table?
-
Birthdate Query
There is a table friends having following detailsName BirthdayJohn 28-jun-1985Peter 27-aug-1987Tom 13-aug-1986Nick 29-apr-1987Natalia 25-apr-1984Kate 28-jun-1984Wilson 11-nov-1987krish 31-jul-1987robert 25-apr-1984
SELECT names of the friends which come on the same day.. condition you don't know which birthday's repeat
SELECT... -
What is difference between Rename and Alias?
Rename is a permanent name given to a table or column whereas Alias is a temporary name given to a table or column which do not exist once the SQL statement is executed.
-
-
What are various constraints used in SQL?
NULLNOT NULLCHECKDEFAULT
-
-
-
Salary Increment Query
Increment the salaries by 5% and add a comm. of 300 to the existing comm, and changing the clerk to jobs of all salesman whose salary is more than or equal to 1500.
-
What is difference between UNIQUE and PRIMARY KEY constraints?
A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically defined to be mandatory must also specify the column is NOT NULL.
-
How can you retrieve the numeric values from varchar2 type column?
Hi Friends, One table is there. It is having varchar2 type column and this column having both numeric and alphanumeric values but I want to retrieve only numeric related values from that table. If it is possible then say the answer plz... I will wait for ur tremendous answer...
-
-
-
Outer Join
When will we use outer join? Explain with example
-
-
What is a pseudo column. Give some examples?
It is a column that is not an actual column in the table.eg USER, UID, SYSDATE, ROWNUM, ROWID, NULL, AND LEVEL.
-
Performance Tuning
What is mean by Performance Tuning? Explain with example.
-
Studetnt Result should get Pass (or) Fail
Hi guys try this query
If any student fails in one subject also his result should be Faile r else Pass
condtion is(marks>=40 "PASS" marks -
Replace Alternate Character in a String
SQL query to replace every alternate character in a string to capital.
Input string:- govardhana
I need output as gOvArDhAnA
And vice versa i.e, GOVARDHANA and required output as GoVaRdHaNa
Provide 2 separate queries for above scenarios
-
Oracle SQL Interview Questions
Ans