当前位置:网站首页>MySQL 10th job - View
MySQL 10th job - View
2022-06-26 10:28:00 【m0_ sixty-one million nine hundred and sixty-one thousand eight】
Create view “view_info”, Query the names of all employees 、 Employee contact number 、 Workshop address 、 Name of workshop director 、 Contact information of the director
create view view_info as select z.names,z.phones,c.address,c.name,c.phone from lingjinzheng_workshop c left join lingjinzheng_worker z on c.no=z.shop_no;![]()
see “view_info” View field information
select * from view_info;
Create view “view_ chisel”, Inquire about “Chisel” Names of all employees in the workshop 、 Employee contact number 、 Workshop address
create view view_chisel as select z.names,z.phones,c.address from lingjinzheng_workshop c left join lingjinzheng_worker z on c.no=z.shop_no where names like"Chisel";![]()
View all the tables in the library
show tables; 
Create view “view_ standard”, Query the product number of products with qualified quality 、 Employee name 、 Employee contact number ‘
create view view_standard as select cp.nos2,z.names,z.phones from lingjinzheng_worker z left join lingjinzheng_product cp on z.nos=cp.work_no ;
see “view_ standard” View creation statement
show create view view_standard\G;
Create view “view_ product”, Check the product number of all products 、 Qualified or not 、 Employee number 、 Employee name 、 Employee contact information 、 Workshop number 、 Workshop address
create view view_product as select cp.nos2,cp.IS_QUALIFIED,z.nos,z.names,z.phones,c.no,c.address from(lingjinzheng_workshop c left join lingjinzheng_worker z on c.no=z.shop_no)left join lingjinzheng_product cp on z.nos=cp.work_no;

View all the tables in the library
show tables;
Delete “view_ chisel” View
drop view view_chisel;
Create view “view_ leave”, Query the workshop number of resigned employees 、 Workshop director 、 Contact information of the director
create view view_leave as select cp.NOs2,c.name,c.phone from(lingjinzheng_workshop c left join lingjinzheng_worker z on c.no=z.shop_no)left join lingjinzheng_product cp on z.nos=cp.work_no where z.IS_ONWORK like"0";![]()
View all the tables in the library
show tables;
边栏推荐
- 开发者,微服务架构到底是什么?
- Differences between JVM, Dalvik and art
- MySQL第七次作业-更新数据
- SSM项目小例子,SSM整合图文详细教程
- 创建对象的时候堆内存的分配
- MySQL job 11 - application de la vue
- In the fragment, the input method is hidden after clicking the confirm cancel button in the alertdialog (this is valid after looking for it on the Internet for a long time)
- Allocation de mémoire tas lors de la création d'objets
- 36 qtextedit control input multiline text
- 【无标题】
猜你喜欢

Record the handling of oom problems caused by too many threads at one time

C中字符串基本操作

Using foreach to loop two-dimensional array

MySQL第十一作业-视图的应用

The first batch of 12 enterprises settled in! Opening of the first time-honored product counter in Guangzhou

DBSCAN

Develop current learning objectives and methods

The fourteenth MySQL operation - e-mall project

Based on Zeng Shen's explanation, the line segment tree is studied again one

How to change the QR code material color of wechat applet
随机推荐
JS reverse | four libraries and one platform response data encryption
Constraintlayout control uses full Raiders
如何更改微信小程序二维码物料颜色
Appium自动化测试基础 — 移动端测试环境搭建(二)
全渠道、多场景、跨平台,App如何借助数据分析渠道流量
Jar version conflict resolution
MySQL第六次作业-查询数据-多条件
Recyclerview implements flow layout (LinearLayout with line wrap) (flexboxlayoutmanager)
基础-MySQL
利用foreach循环二维数组
What is LSP
How to start the learning journey of webrtc native cross platform development?
【Leetcode】76. 最小覆盖子串
[binary search] 4 Find the median of two positive arrays
MySQL第七次作业-更新数据
36 qtextedit control input multiline text
【无标题】
瑞萨电子面向物联网应用推出完整的智能传感器解决方案
What is a botnet
MySQL第八次作业