-
Insert a record in two tables
How to insert a record in two tables with single insert statement ?
-
-
Create table based on another table
How to create table emp1 based on emp, except comm column?
-
Records Count
How to count number of records in a table without using COUNT function?
-
SQL Query to find the department (ID) wise counts in the company
Write SQL Query to find the department (ID) wise counts in the company.
Schema "employee" contains "employee_id", "employee_name", "dept_id". -
Replace Only Third Character with *
How to replace only third character of employees name with * from employee table?
-
What is difference between SUBSTR and INSTR?
SUBSTR returns a specified portion of a string eg SUBSTR('BCDEF',4) output BCDEINSTR provides character position in which a pattern is found in a string. eg INSTR('ABC-DC-F','-',2) output 7 (2nd occurence of '-')
-
-
-
-
-
What is a OUTER JOIN?
Outer Join--Its a join condition used where you can query all the rows of one of the tables in the join condition even though they don’t satisfy the join condition.
-
Minvalue.sql Select the Nth lowest value from a table
select level, min('col_name') from my_table where level = '&n' connect by prior ('col_name') <'col_name')group by level;Example:Given a table called emp with the following columns:-- id number-- name varchar2(20)-- sal number---- For the second lowest salary:-- select level, min(sal) from emp-- where level=2-- connect by prior sal < sal-- group by level
-
-
-
-
-
-
-
Oracle SQL Interview Questions
Ans