当前位置:网站首页>MySQL视图
MySQL视图
2022-07-23 05:41:00 【夏日入侵bug企划】
MySQL视图(view)
视图:同一张表的数据,通过不同角度看待;
只有DQL数据查询语言才能创建视图
创建视图
create view myview视图名 as DQL语句;
删除视图
drop view myview视图名;
对视图进行增删改查,会影响到原表数据
通过视图影响原表数据的,不是直接操作的原表
例子:
create table emp_bak as select * from emp;
create view 视图名 as select empno,ename,sal from emp_bak;
update 视图名 set ename='hehe',sal=1 where empno = 7369; // 通过视图修改原表数据。
delete from 视图名 where empno = 7369; // 通过视图删除原表数据。
视图的作用
视图可以隐藏表的实现细节。保密级别较高的系统,数据库只对外提供相关的视图,程序员只对视图对象进行CRUD。
边栏推荐
- [untitled]
- Adding environment variables and templates to systemctl service
- activiti7快速入门经验分享
- 用户连续登陆(允许中断)查询sql
- [flick]flick on yarn's flick conf simplest configuration
- mysql免密登录设置
- Activiti7 Quick Start experience sharing
- Entrepôt de données 4.0 Notes - acquisition de données commerciales
- NFT digital collection system development, development trend of Digital Collections
- SQL labs 5-6 customs clearance notes
猜你喜欢

Customized development of ant chain NFT digital collection DAPP mall system

MySQL account management & four engines & database and table building

Entrepôt de données 4.0 Notes - acquisition de données sur le comportement de l'utilisateur II
![[pyrodiomics] the extracted image omics characteristic value is abnormal (many 0 and 1)](/img/73/628e0188e1e2c13e0963746759f691.png)
[pyrodiomics] the extracted image omics characteristic value is abnormal (many 0 and 1)

NFT数字藏品开发/DAPP开发

Development of digital collection system: enterprise layout meta universe digital collection
![[doris] configure and basically use the contents system (continue to add content when you have time)](/img/74/21c5c0866ed6b1bb6f9a1e3755b61e.png)
[doris] configure and basically use the contents system (continue to add content when you have time)

Data warehouse 4.0 notes - user behavior data collection IV

CTF-web 常用软件安装及环境搭建

Genesis曾向三箭资本提供23.6亿美元的贷款
随机推荐
数仓4.0笔记——用户行为数据采集二
Usage of some, every, find, FindIndex
数字藏品系统开发:企业布局元宇宙数字藏品
DVWA learning notes
Federal Reserve governor Waller: decentralized finance may eventually change the traditional financial market
Unable to negotiate with port 51732: no matching host key type found. Their offer:
NFT digital collection system development: Shenzhen Evening News "good times travel" digital collection online seconds chime
NFT数字藏品平台开发搭建,源码开发数字藏品
Typescript introduction
Scala之二流程控制
NFT digital collection platform development and construction, source code development digital collection
kubesphere haproxy+keepalived (一)
Yarn capacity scheduler settings
NFT交易平台数字藏品系统|开发定制
Data warehouse 4.0 notes - data warehouse environment construction - Yan configuration
ES操作命令
Scala之一变量和数据类型
The 6th "Blue Hat Cup" National College Students' Cyber Security Skills Competition - preliminary writeup
数仓4.0笔记——业务数据采集
Development of digital collection system: what are the main features of NFT?