Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Saturday, 20 June 2015

How to create view in oracle

SYNTAX

CREATE OR REPLACE VIEW VIEW_NAME AS
  SELECT COLUMNS
  FROM TABLES
  WHERE CONDITION;

e.g.

CREATE OR REPLACE VIEW EMPLOYEE_VW AS
  SELECT EMPLOYEE_NAME,DEPARTMENT,SALARY
  FROM EMPLOYEE
  WHERE EMPLOYEE_NAME LIKE = '%WAN%';


See also

How to create a view on a table that does not exist?





No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.