Ado. NET Review Summary (7)-View

Source: Internet
Author: User

View
(1) Function: Encapsulates a complex SELECT statement to make it easier to use
(2) Syntax:
Create/alter View Name
As
Select ...
Delete: Drop view name
(3) Use: The view name can be used as a table name for various query operations
(4) Suggestions: Do not add, modify, delete through the view, the main query operation

Example:

1. Create a view:

-- Create a View Create View Student_class--alterasselect studentinfo. *  from Studentinfo Inner Join  on Studentinfo.cid=classinfo.cid
View Code

2. Use:

-- The view stores the SELECT statement, not the result set data Select *  from Student_class where Isdelete=0 and Ctitle=' white tiger '
View Code

3. Delete:

-- Delete Drop View Student_class
View Code

Ado. NET Review Summary (7)-View

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.