Home  >  Article  >  Database  >  What is the SQL statement to create a view?

What is the SQL statement to create a view?

angryTom
angryTomOriginal
2020-02-13 16:56:0933355browse

What is the SQL statement to create a view?

What is the SQL statement to create a view?

You can create a view using the create view statement. The specific statement is as follows :

create view  viewname as select * from Tab_EdsProd(Tab_EdsProd是表的名字)where (后面可以接一些限制的条件)

Delete view: drop view viewname.

What is the SQL statement to create a view?

The role of views:

1. Using views, you can customize user data and focus on specific data.

2. Using views can simplify data operations.

3. Using views, the data in the base table has a certain degree of security. Because the view is virtual and does not exist physically. It only stores a collection of data. We can provide the important field information in the base table to the user without going through the view.

A view is a dynamic collection of data, and the data is updated as the base table is updated. At the same time, users cannot change or delete views at will, which ensures data security.

4. Use views to merge separated data and create partitioned views.

PHP Chinese website has a large number of free SQL tutorials, everyone is welcome to learn!

The above is the detailed content of What is the SQL statement to create a view?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Usage of case when in sqlNext article:Usage of case when in sql