Thursday, March 28, 2013

SQL Interview Questions


1) What is NVL and NVL2 Functions?
2) What is NULLIF and COALESCE Functions?
3) What is TRANSLATE and RELACE Functions?
4) What is SUBSTR and INSTR Functions?
5) What is CASE and DECODE?
6) What is ON DELETE CASCADE and ON DELETE SET NULL?
7) What is View and what is FORCE option in view?
8) What is Mview and what are the advantages of MVIEW.
9) Copy a structure of a table without records?
10) If two structure are same and one table in having data how to insert the data into empty
table?
11) How to display only duplicate rows?
12) How to display nth highest salary?
13) What are the sudo columns?
14) What is difference between IN and EXISTS?
15) Difference between Union and Union ALL.
16) What are the types of joins.
17) What is rownum and rowid.
18) When using index can be more expensive? types of indexes.

Tuesday, September 18, 2012

Wednesday, September 12, 2012

Two source tables to one target table interface example

Create one table for combination of both emp and dept tables.



CREATE TABLE EMP_DEPT AS
  (SELECT E.EMPNO,
      E.ENAME,
      E.JOB,
      E.MGR,
      E.SAL,
      E.HIREDATE,
      E.COMM,
      E.DEPTNO,
      D.DNAME,
      D.LOC
    FROM SCOTT.EMP E,
      SCOTT.DEPT D
    WHERE E.DEPTNO=D.DEPTNO
    AND 1=2
  );














ODI Sample Resume