当前位置:网站首页>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;
边栏推荐
- Global and Chinese market of cryogenic bulk tanks 2022-2028: Research Report on technology, participants, trends, market size and share
- 方法区里面有什么——class文件、class文件常量池、运行时常量池
- MySQL第十一作业-视图的应用
- Global and Chinese markets in hair conditioner 2022-2028: Research Report on technology, participants, trends, market size and share
- [sans titre]
- 【无标题】
- 【Leetcode】76. 最小覆盖子串
- Dialog centered
- Progressive Web 应用程序PWA是应用程序开发的未来
- 动态库连接 - 符号冲突 - 全局符号介入
猜你喜欢

MySQL第九次作业-连接查询&子查询

Standard implementation of streaming layout: a guide to flexboxlayout

Extracting public fragments from thymeleaf

Flutter与原生通信(上)

Some problems to be considered when designing technical implementation scheme

118. Yanghui triangle

SwiftUI 开发经验之为离线优先的应用程序设计数据层

MySQL第十一作業-視圖的應用

exec系列函数(execl、execlp、execle、execv、execvp)使用

MySQL第十次作业-视图
随机推荐
六月集训(第26天) —— 并查集
全渠道、多场景、跨平台,App如何借助数据分析渠道流量
Progressive Web 应用程序PWA是应用程序开发的未来
Omni channel, multi scenario and cross platform, how does app analyze channel traffic with data
Dynamic library connection - symbol conflict - global symbol intervention
1. sum of two numbers (leetcode topic)
The fourteenth MySQL operation - e-mall project
What is in the method area - class file, class file constant pool, runtime constant pool
MySQL Chapter 4 Summary
Global and Chinese market of contemporary lampshade 2022-2028: Research Report on technology, participants, trends, market size and share
利用foreach循环二维数组
MySQL项目8总结
字符串常量池、class常量池和运行时常量池
MySQL 13th job - transaction management
Appium自动化测试基础 — 移动端测试环境搭建(二)
【LeetCode】59. Spiral matrix II
Appium automation test foundation - mobile end test environment construction (II)
Record the handling of oom problems caused by too many threads at one time
Full introduction to flexboxlayout (Google official flexible implementation of flow layout control)
MySQL 11th job - view application