当前位置:网站首页>View analysis
View analysis
2022-06-26 06:19:00 【Oh no, less hair】
1. An understanding of trying
Views are not real tables , Nor does it really exist in the database , It's a virtual table . My most direct understanding of views is the results of joint queries on a table or multiple tables , Applicable to query , Not applicable for updating , Relative to table , Views have the following advantages :
- Simple : View is sql The result returned by executing the query statement , Users do not need to care about the corresponding table structure 、 Association and screening criteria .
- Security : Only let the user see the result set that the user needs to see , It can protect some private information .
2. View creation
- Single table query creates a view
create view [ View name ]
select [ Name ]
from [ Table name ]
where [ Conditions ]
- Multi table joint query to create view
create view [ View name ]
select [ Name ]
from [ surface 1],[ surface 2]
where [ Conditions ]
3. View view
There is no difference between the view and the normal table , It's all about execution select Statement to query
select * from 【 View name 】
4. Modify the view
- Use create or replace view sentence
create or replace view 【 View name 】
( Name ) as select 【 Name 】 from 【 Table name 】
- Use alter Statement to modify
alter view 【 View name 】 (【 Name 】)
as select 【 Name 】 from 【 Table name 】
5. Undo view
drop view 【 View name 】
边栏推荐
- 06. talk about the difference and coding between -is and = = again
- Zotero文献管理工具之Jasminum(茉莉花)插件
- 技术能力的思考和总结
- 连接数服务器数据库报:错误号码2003Can‘t connect to MySQL server on ‘服务器地址‘(10061)
- Market trend report, technical innovation and market forecast of China's valeryl chloride
- How to design a good technical scheme
- ByteDance starts the employee's sudden wealth plan and buys back options with a large amount of money. Some people can earn up to 175%
- numpy. tile()
- Everything is a vector. The service practice of iqiyi online vector recall project
- Redis multithreading and ACL
猜你喜欢
Alarm operation and Maintenance Center | build an efficient and accurate alarm collaborative processing system

Gof23 - builder mode

Message queuing - omnidirectional comparison
How can an enterprise successfully complete cloud migration?

DS18B20详解
Customer Stories | Netease spring breeze: the "spring breeze" of the fun industry, reaching out to all areas through in-depth interaction

数据可视化实战:实验报告
A new paradigm for large model application: unified feature representation optimization (UFO)

MySQL-08

Logstash——使用throttle过滤器向钉钉发送预警消息
随机推荐
Architecture design method
Everything is a vector. The service practice of iqiyi online vector recall project
Library management system
Lamda expression
NPM private server problem of peanut shell intranet penetration mapping
Thread status and stop
去哪儿网BI平台建设演进史
Thinking skills of technical leaders
Transformer中的Self-Attention以及Multi-Head Self-Attention(MSA)
技术Leader的思考技巧
numpy. frombuffer()
Typora activation method
Message queue - message transaction management comparison
Pytorch uses multi GPU parallel training and its principle and precautions
TCP connection and disconnection, detailed explanation of state transition diagram
连接数服务器数据库报:错误号码2003Can‘t connect to MySQL server on ‘服务器地址‘(10061)
MySQL-06
TCP連接與斷開,狀態遷移圖詳解
GoF23—原型模式
EFK升级到ClickHouse的日志存储实战