Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SqlServer Series Notes-View

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

View Overview

What is a view?

A view is a database object that is created based on a query and can reference one or more tables in the view.

A view is a virtual table that can be used to map a subset of one or more tables.

Its content is defined by a query statement

Is a data object in a database that does not store data, but only stores a query statement

The table referenced by the view is called the base table

All the data in the view comes from the base table.

Once the view is defined, it can be used like a normal table

Using a view is actually executing a query saved in the view

1. A view is a virtual table that represents part of the data of a table or the combined data of multiple tables.

Its structure and data are based on the query of the table.

two。 There is no difference between a view and a data table in operation.

But the difference between the two is that they are essentially different: the data table is the place where the records are actually stored, while the view does not save any records

It actually stores query statements.

3. The same data table, according to the different needs of different users

You can create different views (different query statements)

Advantages:

Filter rows in a table

Prevent unauthorized users from accessing sensitive data

Reduce the complexity of the database

Simplify data operation

Improve the security of the database

Create a view

Create view view_Name

As

Select column_name,column_name from table_name

Working with View

Select * from view_name

Delete View

Drop view view_name

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report