当前位置:网站首页>Database objects: view learning records
Database objects: view learning records
2022-07-01 06:35:00 【Small dollar】
Common database objects
surface
The data dictionary : Just check without modifying
constraint :
View :
Indexes :
stored procedure :
Storage function :
trigger :
View
Views are built on existing tables , Existing tables are called base tables
The advantages of views simplify queries
Views are generally used on large projects , Can control data and access .
Create a view , For single table
CREATE VIEW vu_emp1
AS
SELECT employee_id,last_name,salary
FROM emps
Based on multiple tables
Use the view to format the data
CREATE VIEW abc AS
SELECT CONCAT(last_name,‘(’,department_name,‘)’) FROM emps e JOIN depts d ON e.department_id = d.department_id
SELECT * FROM abc
Create views based on views
View view
There are four ways to view
View view show tables
View view structure describe xx
View the attribute information of the view :SHOW TABLE STATUS LIKE ‘abc’
View the detailed definition information of the view
Changes to the view will affect the data in the table
Generally, the update of view will affect the data , There are also situations that will not be updated
Modify the view , Delete view
CREATE OR REPLACE VIEW vu_emp1
AS
SELECT email,last_name,employee_id FROM emps
Modify the view
DROP VIEW vu_empl
边栏推荐
- [wechat applet] to solve button, input and image components
- 软件工程复习
- ManageEngine Zhuohao helps you comply with ISO 20000 standard (IV)
- async 与 await
- C language course set up property fee management system (big work)
- Lxml module (data extraction)
- C语言课设学生信息管理系统(大作业)
- 伪装请求头库: anti-useragent
- 如果我在广州,到哪里开户比较好?究竟网上开户是否安全么?
- Common shortcut keys
猜你喜欢

Forkjoin and stream flow test

【#Unity Shader#自定义材质面板_第二篇】

SQL语句

ManageEngine Zhuohao helps you comply with ISO 20000 standard (IV)

High order binary balanced tree
![[network security tool] what is the use of USB control software](/img/cc/20fc1f35c139c52c5922727368b835.png)
[network security tool] what is the use of USB control software

问题:OfficeException: failed to start and connect(二)
![[unity shader ablation effect _ case sharing]](/img/e3/464f1cf426e8c03ce3d538ed9cf4bc.png)
[unity shader ablation effect _ case sharing]

C语言课设学生选修课程系统(大作业)

Application of IT service management (ITSM) in Higher Education
随机推荐
C语言课设学生信息管理系统(大作业)
How did ManageEngine Zhuohao achieve the goal of being selected into Gartner Magic Quadrant for four consecutive years?
DSBridge
Docker 安装部署Redis
Postgraduate entrance examination directory link
High order binary search tree
webapck打包原理--启动过程分析
自开发软件NoiseCreater1.1版本免费试用
SQL学习笔记九种连接2
[ManageEngine Zhuohao] helps Huangshi Aikang hospital realize intelligent batch network equipment configuration management
[network security tool] what is the use of USB control software
What is a port scanning tool? What is the use of port scanning tools
ManageEngine Zhuohao helps you comply with ISO 20000 standard (IV)
[ManageEngine Zhuohao] helps Julia college, the world's top Conservatory of music, improve terminal security
PAT (Advanced Level) Practice 1057 Stack
H5网页判断是否安装了某个APP,安装则跳转未安装则下载的方案总结
[unity shader custom material panel part I]
[unity shader custom material panel part II]
[ManageEngine Zhuohao] what is network operation and maintenance management and what is the use of network operation and maintenance platform
[ITSM] what is ITSM and why does it department need ITSM