当前位置:网站首页>MySQL exercise 2
MySQL exercise 2
2022-07-25 12:16:00 【Gremmie102】


insert into goods values(
' Schoolbag ',
18.91,
101,
NULL
);



insert into book values(
'Java The core technology ',
'Cay S. Horstman',
56.43,
' Computer technology '
);


CD The question is actually asking, and the second character is A Which is the most important , Strictly speaking, only C Yes , But the question plane does not explain the verification rules . In general , The default verification rule is utf8_general_ci. In this situation ,D Also on the .

First , Let's create a system composed of 100 A table of records

delimiter //
drop procedure if exists test; # If there is test Stored procedures are deleted
create procedure test() # Create a parameterless stored procedure , The name is test
begin
declare i int; # Declare variables
set i = 1;
while i <= 100 do # Conditions for ending the cycle : When i Greater than 100 Jump out of the loop
INSERT INTO test values(i);
set i = i + 1; # Cycle time ,i Add 1
end while; # end while loop
select * from test; # see test Table data
END
// # End definition statement
CALL test(); # End definition statement
DELIMITER ; # Reset the separator to ;
It turns out that :1-50,70
The logic required is :[1,50] or ((25 or 70 or 95) And [25,75]), Only 25 and 70 Satisfy , The options are not , The first half 1~50 All satisfied with , Only A Option 30 In this range , It would be 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 =' Zhang %' 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;
Conditions 1 Two between…and… Yes or relationship , Follow “accout Column is not empty ” This condition is and related . Conditions 1 And conditions 2 Yes or relationship .
边栏推荐
- WPF项目入门1-简单登录页面的设计和开发
- Data transmission under the same LAN based on tcp/ip
- 利用wireshark对TCP抓包分析
- [multimodal] hit: hierarchical transformer with momentum contract for video text retrieval iccv 2021
- Zuul gateway use
- 【AI4Code最终章】AlphaCode:《Competition-Level Code Generation with AlphaCode》(DeepMind)
- Zuul网关使用
- R语言ggplot2可视化:使用ggpubr包的ggstripchart函数可视化点状条带图、设置palette参数配置不同水平数据点的颜色、设置add参数在点状条带图中添加均值标准差竖线
- 客户端开放下载, 欢迎尝鲜
- Brpc source code analysis (II) -- the processing process of brpc receiving requests
猜你喜欢

【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)

Hydrogen entrepreneurship competition | Liu Yafang, deputy director of the science and Technology Department of the National Energy Administration: building a high-quality innovation system is the cor
![[untitled]](/img/83/9b9a0de33d48f7d041acac8cfe5d6a.png)
[untitled]

3.2.1 什么是机器学习?

Brpc source code analysis (II) -- the processing process of brpc receiving requests

Feign使用

Unexpected rollback exception analysis and transaction propagation strategy for nested transactions

Brpc source code analysis (V) -- detailed explanation of basic resource pool

Atomic 原子类

【AI4Code】《CodeBERT: A Pre-Trained Model for Programming and Natural Languages》 EMNLP 2020
随机推荐
苹果供应链十年浮沉:洋班主任和它的中国学生们
[micro service ~sentinel] sentinel degradation, current limiting, fusing
投屏收费背后:爱奇艺季度盈利,优酷急了?
Resttemplate and ribbon are easy to use
Week303 of leetcode (20220724)
Jenkins配置流水线
嵌套事务 UnexpectedRollbackException 分析与事务传播策略
Pairwise comparison of whether the mean values between R language groups are the same: pairwise hypothesis test of the mean values of multiple grouped data is performed using pairwise.t.test function
那些离开网易的年轻人
Introduction to redis
Multi label image classification
Feign使用
【GCN-CTR】DC-GNN: Decoupled GNN for Improving and Accelerating Large-Scale E-commerce Retrieval WWW22
【AI4Code】《InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees》ICSE‘21
Brpc source code analysis (I) -- the main process of RPC service addition and server startup
Heterogeneous graph neural network for recommendation system problems (ackrec, hfgn)
R language ggpubr package ggarrange function combines multiple images and annotates_ Figure function adds annotation, annotation and annotation information for the combined image, adds image labels fo
Add a little surprise to life and be a prototype designer of creative life -- sharing with X contestants in the programming challenge
【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)
[RS sampling] a gain tuning dynamic negative sampler for recommendation (WWW 2022)