What is the syntax for creating a view?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is the syntax for creating a view?

Rating:

Following is the syntax for creating a view:

CREATE [OR REPLACE] [FORCE | NOFORCE] VIEW ViewName
[ (alias [, alias]...) ]
AS subquery
[WITH { READ ONLY | CHECK OPTION [CONSTRAINT ConstraintName] }];


where,

  • OR REPLACE re-creates a pre-existing view with the new specified definition.

  • FORCE creates a view regardless of whether or not the base tables exist.

  • NOFORCE creates a view only if the base tables exist.

  • ViewName specifies the name of the view to be created.

  • alias specifies a name for the column selected by the view's subquery.

  • subquery is a SELECT statement that retrieves data from the base tables.

  • WITH READ ONLY ensures that no DML operation can be performed on the view.

  • WITH CHECK OPTION ensures that only rows accessible to the view can be manipulated.

  • ConstraintName specifies the name of the CHECK constraint.

  • Rating:



    Other articles

    Click here to Article home

     
    uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
    MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
    Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
    © 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.