当前位置:网站首页>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
边栏推荐
- 自开发软件NoiseCreater1.1版本免费试用
- 【#Unity Shader#Amplify Shader Editor(ASE)_第九篇】
- On whether variables are thread safe
- 阿里OSS Postman Invalid according to Policy: Policy Condition failed: [“starts-with“, “$key“, “test/“]
- To sort out the anomaly detection methods, just read this article!
- [ManageEngine Zhuohao] helps Huangshi Aikang hospital realize intelligent batch network equipment configuration management
- 考研目录链接
- C语言课设职工信息管理系统(大作业)
- 关于变量是否线程安全的问题
- How does the port scanning tool help enterprises?
猜你喜欢
![[wechat applet] to solve button, input and image components](/img/7f/a61ee2f610b2f0f9fb0b34cb960f81.jpg)
[wechat applet] to solve button, input and image components

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

产品学习(一)——结构图

C language course set up library information management system (big homework)

C language course set up property fee management system (big work)

Embedded system
![[unity shader ablation effect _ case sharing]](/img/e3/464f1cf426e8c03ce3d538ed9cf4bc.png)
[unity shader ablation effect _ case sharing]

On siem

Forkjoin and stream flow test

Design of sales management system for C language course (big homework)
随机推荐
sci-hub如何使用
How does the port scanning tool help enterprises?
[network security tool] what is the use of USB control software
[ITSM] what is ITSM and why does it department need ITSM
idea 好用插件汇总!!!
Common shortcut keys
What are the functions of LAN monitoring software
存储过程学习笔记
TCL statements in SQL (transaction control statements)
C语言课设学生信息管理系统(大作业)
Embedded system
概率论学习笔记
产品学习(三)——需求列表
如果我在广州,到哪里开户比较好?究竟网上开户是否安全么?
问题:OfficeException: failed to start and connect(三)
C language course set up library information management system (big homework)
webapck打包原理--启动过程分析
常用快捷键
Teach you how to implement a deep learning framework
[wechat applet] how to build a building block development?