当前位置:网站首页>MySQL第十一作业-视图的应用
MySQL第十一作业-视图的应用
2022-06-26 09:37:00 【m0_61961898】

create table lingjinzheng_stu(
s_id int(11) primary key not null unique,
s_name varchar(20) not null,
addr varchar(50) not null,
tel varchar(50) not null
);
create table lingjinzheng_sign(
s_id int(11) primary key not null unique,
s_name varchar(20) not null,
s_sch varchar(50) not null,
s_sign_sch varchar(50) not null
);
create table lingjinzheng_stu_mark(
s_id int(11) primary key not null unique,
s_name varchar(20) not null,
mark int(11) not null
);
insert into lingjinzheng_stu values
(“1”,“ZhangPeng”,“Hebei”,“13889075861”),
(“2”,“LiXiao”,“Shandong”,“13953508223”),
(“3”,“HuangYun”,“Shandong”,“13905350996”);

insert into lingjinzheng_sign values
(“1”,“ZhangPeng”,“Hign School1”,“Peking University”),
(“2”,“LiXiao”,“Hign School2”,“Peking University”),
(“3”,“HuangYun”,“Hign School3”,“Tsinghua University”);

insert intolingjinzgheng_stu_mark values
(“1”,“ZhangPeng”,“730”),
(“2”,“LiXiao”,“725”),
(“3”,“HuangYun”,“736”);
create view lingjinzheng_baida(id,name,mark,sch)as
select m.s_id,m.s_name,m.mark,s.s_sign_sch
from lingjingzheng_stu_mark mlingjinzheng_sign s
where m.s_id=s.s_id and m.mark>=720 and s.s_sign_sch=“Peking University”;
create view lingjinzheng_qinghua(id,name,mark,sch)as
select m.s_id,m.s_name,m.mark,s.s_sign_sch
from lingjinzheng_stu_mark m,zhongzheng_sign s
where m.s_id=s.s_id and m.mark>=725 and s.s_sign_sch=“Peking University”;
select * fromlingjingzheng_qinghua;
update lingjinzheng_stu_mark set mark=mark-10
where lingjingzheng_stu_mark.s_name=“HuangYun”;


边栏推荐
- echo $?
- From TF 1 X to TF 2.6 (update if you encounter it)
- 动态库连接 - 符号冲突 - 全局符号介入
- #云原生征文# 在 Google Kubernetes Cluster 上使用 HANA Expression Database Service
- Some problems to be considered when designing technical implementation scheme
- Dialog centered
- MySQL第五章总结
- Solution to network request crash in retrofit2.8.1
- Mysql database operation commands (constantly updated)
- The basis of C language grammar -- pointer (multidimensional array, function, summary) learning
猜你喜欢

微软 Edge 浏览器 IE 模式标签页出现卡死情况,已通过回滚更新修复

String constant pool, class constant pool, and runtime constant pool

Allocation de mémoire tas lors de la création d'objets

Standard implementation of streaming layout: a guide to flexboxlayout

3行3列整形二维数组,求对角之和

A list of common methods for customizing paint and canvas of view

Redis novice introduction

Deep learning (tentsorflow2. version) three good student performance problems (1)

Redis notes (12) - single thread architecture (non blocking IO, multiplexing) and multiple asynchronous threads

Cmake / set command
随机推荐
This new change of go 1.16 needs to be adapted: the changes of go get and go install
Appium自动化测试基础 — 移动端测试环境搭建(二)
Download MySQL database installation package website of each system and version
Specific meaning of go bootstrap
Jupyter Notebook遇到的问题
What are the symbolic and direct references of the JVM
调用api接口生成不同颜色的微信小程序二维码
Leetcode intermediate node of linked list
Testing practice - App testing considerations
瑞萨电子面向物联网应用推出完整的智能传感器解决方案
动态库连接 - 符号冲突 - 全局符号介入
Solution to network request crash in retrofit2.8.1
String constant pool, class constant pool, and runtime constant pool
Specific implementation comparison between different programming languages
String class intern() method and string constant pool
Cmake / set command
3行3列整形二维数组,求对角之和
测试实践——app 测试注意点
Automated testing -- Introduction and example of pytest framework
自动化测试——关于unitest与pytest初始化共存问题