Oracle's Learning Three

Source: Internet
Author: User

DDL data Definition language CREATE ALTER DROP

DML Data Manipulation Language INSERT UPDATE DELETE

DQL Data Query Language SELECT

TCL Transaction Control Language COMMIT ROLLBACK

DCL Data Control Language GRANT REVOKE

View:

    1. Simplify the SQL statement; 2. Provides a simple and effective security mechanism

In-Work View Application Specification:

    1. The view is bound to encapsulate multi-table data, single-table data is not allowed to encapsulate the view;

2. The view is created only to allow the creation of read-only views;

3. Is not allowed to modify data through the view, key to preserve the table

--If you want to modify, it is usually only allowed to modify the foreign key table data, not to allow the primary key table data modification

--View Simplification:

CREATE OR REPLACE VIEW  as   The SELECT--or REPLACE represents a view A1 that overrides the same name     . * , B1. NAMEfrom    a table A1INNERJOINon=  withREAD only

--Query simplification:

SELECT     A1. ID,    A1. NAME,    B1. NAME from     table A A1INNERJOINon= b1.iiid

--Delete view:

DROP  View Name

Materialized view (manifested view) < understanding ;:

A materialized entity is equivalent to an established copy, similar to a table, which requires storage space, and the query efficiency is the same as the entity table.

Sequence: How standard is created

CREATEby1--increment value  -     -maximum value, can not set the default number of 9      with 2   -the starting value, shown here starting from 2 nocycle        -non-cyclic NOCACHE; --Do not cache

The sequence is very flexible, so just remember that the sequence is for us to increase the table's primary key, in fact, Oracle is the sequence + trigger implementation of the primary key self-augmented reality 80% preferred MySQL + Redis for mainstream development

Oracle's Learning Three

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.