SQL server view

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

A view is a common database object that stores query results in a virtual table. The view has many advantages: 1. It can simplify operations, 2. It can set up front-end and back-end buffering, 3. It can combine and split data, 4, the most important thing is to improve security. Therefore, visual charts also occupy a very important position in SQL. In the summary of this chapter, I deeply realized that two methods: 1, Enterprise Manager, 2, T-SQL statements to manage the view, and four operations: 1, add, 2 ,, delete, 3, modify, 4, query.

In the Enterprise Manager and now SQL server Management Studio, these operations are all the same! For example, create a view, right-click the view, and create a new view. The Wizard will be available in the future!

The following focuses on the use of T-SQL statements to execute these operations summary:

Here is an example of creating a view:

For example, to create a view in the company database, the results returned by the view must contain the information project name, customer name, employee name, start date, and estimated duration.

Use company create view Project Information view as select. project name, B. customer name, c. name, a, start date,. expected construction period From project as a inner join customer as B On. customer ID = B. customer No. innerjoin employee as c Where. customer ID = B. customer ID and. owner ID = c. no. go

Of course, we can also perform some operations on the data in the table through the View:

Related Article

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.