当前位置:网站首页>MySQL练习二
MySQL练习二
2022-07-25 11:32:00 【Gremmie102】


insert into goods values(
'学生书包',
18.91,
101,
NULL
);



insert into book values(
'Java核心技术',
'Cay S. Horstman',
56.43,
'计算机技术'
);


CD题面其实是在问第二个字符是A的是哪个,严格意义上只有C对,但是题面没有说明校验规则。在通常情况下,默认校验规则是utf8_general_ci。在这个状况下,D也对。

首先,我们来创建一个由100条记录的表

delimiter //
drop procedure if exists test; #如果存在test存储过程则删除
create procedure test() #创建无参存储过程,名称为test
begin
declare i int; #声明变量
set i = 1;
while i <= 100 do #结束循环的条件:当i大于100时跳出循环
INSERT INTO test values(i);
set i = i + 1; #循环一次,i加1
end while; #结束while循环
select * from test; #查看test表数据
END
// #结束定义语句
CALL test(); #结束定义语句
DELIMITER ; #重新将分隔符设置为;
结果显示为:1-50,70
要求的逻辑是:[1,50]或((25或70或95)且[25,75]),后半段只有25和70满足,选项没有,前半段1~50都满足,只有A选项的30在这个范围内,那就A了。


update goods set price = price+50 where inventory > 30;



.
delete from goods where price>60 or inventory<200;




select name,age from student where name ='张%' and age between 18 and 25;

select * from article where create_date between '2019-01-01 10:30:00' and '2019-11-10 16:02:00';

select * from article where title is null or create_date > '2019-01-01 00:00:00';

select * from book where author is not null or (price >50 and publish_date>'2019-01-01 00:00:00');

select * from user where (ID between 1 and 200 or between 300 and 500)
and account IS NOT NULL OR amount>1000;
条件1两个between…and…间是或关系,跟“accout列不为空”这个条件是且关系。条件1与条件2间是或关系。
边栏推荐
- 协程
- Mirror Grid
- Go 垃圾回收器指南
- Eureka使用记录
- Data transmission under the same LAN based on tcp/ip
- Atomic 原子类
- PHP curl post length required error setting header header
- [multimodal] hit: hierarchical transformer with momentum contract for video text retrieval iccv 2021
- Innovation and breakthrough! AsiaInfo technology helped a province of China Mobile complete the independent and controllable transformation of its core accounting database
- 给生活加点惊喜,做创意生活的原型设计师丨编程挑战赛 x 选手分享
猜你喜欢

Atomic atomic class

Qin long, a technical expert of Alibaba cloud: a prerequisite for reliability assurance - how to carry out chaos engineering on the cloud

知识图谱用于推荐系统问题(MVIN,KERL,CKAN,KRED,GAEAT)

Heterogeneous graph neural network for recommendation system problems (ackrec, hfgn)

PHP curl post length required error setting header header

【GCN-RS】MCL: Mixed-Centric Loss for Collaborative Filtering (WWW‘22)

【黑马早报】运营23年,易趣网宣布关停;蔚来对大众CEO抛出橄榄枝;华为天才少年曾放弃360万年薪;尹烨回应饶毅炮轰其伪科学...

【Debias】Model-Agnostic Counterfactual Reasoning for Eliminating Popularity Bias in RS(KDD‘21)

【AI4Code】《Pythia: AI-assisted Code Completion System》(KDD 2019)

Brpc source code analysis (IV) -- bthread mechanism
随机推荐
【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)
【AI4Code】《IntelliCode Compose: Code Generation using Transformer》 ESEC/FSE 2020
Brpc source code analysis (IV) -- bthread mechanism
【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)
The applet image cannot display Base64 pictures. The solution is valid
面试官:“同学,你做过真实落地项目吗?”
Ups and downs of Apple's supply chain in the past decade: foreign head teachers and their Chinese students
小程序image 无法显示base64 图片 解决办法 有效
【对比学习】Understanding the Behaviour of Contrastive Loss (CVPR‘21)
【6篇文章串讲ScalableGNN】围绕WWW 2022 best paper《PaSca》
图神经网络用于推荐系统问题(IMP-GCN,LR-GCN)
Behind the screen projection charge: iqiyi's quarterly profit, is Youku in a hurry?
Learning to Pre-train Graph Neural Networks(图预训练与微调差异)
selenium使用———安装、测试
那些离开网易的年轻人
Intelligent information retrieval(智能信息检索综述)
Solutions to the failure of winddowns planning task execution bat to execute PHP files
R语言可视化散点图、使用ggrepel包的geom_text_repel函数避免数据点之间的标签互相重叠(设置min.segment.length参数为Inf不添加标签线段)
monit安装和使用
R语言ggplot2可视化:使用ggpubr包的ggviolin函数可视化小提琴图、设置add参数在小提琴内部添加抖动数据点以及均值标准差竖线(jitter and mean_sd)