当前位置:网站首页>Use of views
Use of views
2022-07-26 07:37:00 【Xiaolesheng】
Concept
The view is a virtual table , It preserves SELECT The definition of the statement , It is a way for users to view data in data .
Through it, you can browse part or all of the data in the table in the way you need , And these data are still stored in the table of the database , Such a table is called a base table .
characteristic
The data in the view does not belong to the view itself , It's a basic table , Views can be treated like tables insert,update,delete operation .
The view cannot be modified , After the table is modified or deleted, the view should be deleted and rebuilt .
There is no limit to the number of views , But names can't be repeated with views and tables , Have uniqueness .
Views can be nested , One view can be nested with another view .
View cannot be indexed , Cannot have an associated trigger and default value ,sql server Cannot be used after a view order by Sort .
Create and use views
- Create view
create view view_name as select_statement( Some operations of adding, deleting, modifying and querying tables )- eg:
create name v_student as select * from student where stuno=“20000002”
- eg:
- View view
select * from v_student; - Modify the view
alter view view_name as select_statement- eg:
alter view v_student as select stuname,stuno from student where class=‘002’;
- eg:
- Delete view
drop view view_name;- eg:
drop view v_student;
- eg:
边栏推荐
- Machine learning related competition website
- Installation of Baidu flying paste deep learning framework tutorial in Anaconda
- 深度学习模型部署
- Modulenotfounderror: no module named 'pip' solution
- Vscode cannot start the problem solving idea
- Examples of financial tasks: real-time and offline approval of three scenarios and five optimizations of Apache dolphin scheduler in Xinwang bank
- 2022.7.22DAY612
- Idea shortcut key
- Parameterization of JMeter performance test using CSV file
- Summary of API method
猜你喜欢

深度学习模型部署

Hcip--- MPLS detailed explanation and BGP route filtering

The analysis, solution and development of the problem of router dropping frequently

MMOE多目标建模
![[daily question 1] 919. Complete binary tree inserter](/img/a2/2ff77ccdfb78bb1812b989342c2331.png)
[daily question 1] 919. Complete binary tree inserter

MMOE multi-objective modeling

数据库基础

NFT digital collection system development: the collision of literature + Digital Collections

WCF introductory tutorial II

Machine learning related competition website
随机推荐
PR subtitle production
OVS底层实现原理
System architecture & microservices
Modulenotfounderror: no module named 'pip' solution
元宇宙基础设施:WEB 3.0 chain33 优势分析
0 dynamic programming leetcode1567. Length of the longest subarray with positive product
Common templates for web development
Taishan Office Technology Lecture: how to calculate page blank (margin)
JMeter performance test saves the results of each interface request to a file
Jmeter性能测试之使用存储响应内容到文件监听器
Abnormal (2)
什么是消息订阅和发布?
微服务feign调用时候,token丢失问题解决方案
Jmeter性能测试之将每次接口请求的结果保存到文件中
Interview question set
2021-11-09
C # use log4net to record logs (basic chapter)
Examples of financial tasks: real-time and offline approval of three scenarios and five optimizations of Apache dolphin scheduler in Xinwang bank
Open source management system based on ThinkPHP
Hystrix配置简单说明