当前位置:网站首页>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 .
边栏推荐
- R语言使用lm函数构建多元回归模型(Multiple Linear Regression)、使用step函数构建前向逐步回归模型筛选预测变量的最佳子集、scope参数指定候选预测变量
- 那些离开网易的年轻人
- R language Visual scatter diagram, geom using ggrep package_ text_ The rep function avoids overlapping labels between data points (set the min.segment.length parameter to inf and do not add label segm
- Atomic atomic class
- 【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)
- 【GCN-CTR】DC-GNN: Decoupled GNN for Improving and Accelerating Large-Scale E-commerce Retrieval WWW22
- Week303 of leetcode (20220724)
- 【AI4Code最终章】AlphaCode:《Competition-Level Code Generation with AlphaCode》(DeepMind)
- monit安装和使用
- [multimodal] transferrec: learning transferable recommendation from texture of modality feedback arXiv '22
猜你喜欢

【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)

Can't delete the blank page in word? How to operate?

Eureka注册中心开启密码认证-记录

2.1.2 机器学习的应用

【AI4Code】《IntelliCode Compose: Code Generation using Transformer》 ESEC/FSE 2020

Resttemplate and ribbon are easy to use

【GCN多模态RS】《Pre-training Representations of Multi-modal Multi-query E-commerce Search》 KDD 2022

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

【AI4Code】《InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees》ICSE‘21

MySQL练习二
随机推荐
Implement anti-theft chain through referer request header
How to solve the problem of the error reported by the Flink SQL client when connecting to MySQL?
Brpc source code analysis (V) -- detailed explanation of basic resource pool
那些离开网易的年轻人
【RS采样】A Gain-Tuning Dynamic Negative Sampler for Recommendation (WWW 2022)
Hystrix使用
Musk's "eternal soul": half hype, half flicker
【AI4Code】《Pythia: AI-assisted Code Completion System》(KDD 2019)
919. 完全二叉树插入器 : 简单 BFS 运用题
RestTemplate与Ribbon简单使用
PHP curl post length required error setting header header
马斯克的“灵魂永生”:一半炒作,一半忽悠
Application of comparative learning (lcgnn, videomoco, graphcl, XMC GaN)
Zuul网关使用
From cloud native to intelligent, in-depth interpretation of the industry's first "best practice map of live video technology"
[high concurrency] a lock faster than read-write lock in high concurrency scenarios. I'm completely convinced after reading it!! (recommended Collection)
Go garbage collector Guide
aaaaaaaaaaA heH heH nuN
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
Multi label image classification