Sayantan's Blog On Oracle

Sayantan's blogs on Oracle

Learn Oracle with Sayantan

sayan_bappa@yahoo.co.in

Avatar

MINUS Operator In Oracle

MINUS Operator In Oracle

MINUS returns all the distinct rows from first select statement which are not present in second select statement.

Below is the graphical representation of MINUS operator.

MINUS Operator In Oracle : Output
CREATE TABLE EMPLOYEES_MINUS_30
AS
SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, HIRE_DATE, 

INTERSECT Operator In Oracle

INTERSECT Operator In Oracle

INTERSECT operators returns the distinct common rows from each query.

Below is the graphical representation of INTERSECT operator.

INTERSECT Operators In Oracle : Output
INTERSECT Operator In Oracle : Output
CREATE TABLE EMPLOYEES_INTERSECT_30
AS
SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, HIRE_DATE, JOB_ID, SALARY, 

SEQUENCE in Oracle

SEQUENCE in Oracle

  • SEQUENCE is used to generate unique numbers automatically in oracle
  • It is a database object
  • It is used to generally create PRIMARY KEY values

CREATE SEQUENCE Statement description:

Keywords related to CREATE SEQUENCE statement:

  • INCREMENT BY
  • STARTS