当前位置:网站首页>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 .
边栏推荐
- OSPF comprehensive experiment
- Multi label image classification
- Transformer variants (spark transformer, longformer, switch transformer)
- NLP knowledge - pytorch, back propagation, some small pieces of notes for predictive tasks
- R language ggplot2 visualization: visualize the scatter diagram, add text labels to some data points in the scatter diagram, and use geom of ggrep package_ text_ The repl function avoids overlapping l
- Location analysis of recording an online deadlock
- aaaaaaaaaaA heH heH nuN
- Ansible
- Unexpected rollback exception analysis and transaction propagation strategy for nested transactions
- 【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)
猜你喜欢

马斯克的“灵魂永生”:一半炒作,一半忽悠

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

那些离开网易的年轻人

Add a little surprise to life and be a prototype designer of creative life -- sharing with X contestants in the programming challenge

投屏收费背后:爱奇艺季度盈利,优酷急了?

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

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

【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)

客户端开放下载, 欢迎尝鲜

Location analysis of recording an online deadlock
随机推荐
Week303 of leetcode (20220724)
Median (二分答案 + 二分查找)
aaaaaaaaaaA heH heH nuN
Application of comparative learning (lcgnn, videomoco, graphcl, XMC GaN)
【GCN】《Adaptive Propagation Graph Convolutional Network》(TNNLS 2020)
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
[untitled]
[high concurrency] Why is the simpledateformat class thread safe? (six solutions are attached, which are recommended for collection)
Solutions to the failure of winddowns planning task execution bat to execute PHP files
水博士2
Unexpected rollback exception analysis and transaction propagation strategy for nested transactions
Brpc source code analysis (IV) -- bthread mechanism
R language ggplot2 visualization: use the ggviolin function of ggpubr package to visualize the violin graph, set the add parameter to add jitter data points and mean standard deviation vertical bars (
嵌套事务 UnexpectedRollbackException 分析与事务传播策略
R语言使用lm函数构建多元回归模型(Multiple Linear Regression)、使用step函数构建前向逐步回归模型筛选预测变量的最佳子集、scope参数指定候选预测变量
客户端开放下载, 欢迎尝鲜
The applet image cannot display Base64 pictures. The solution is valid
PHP curl post x-www-form-urlencoded
[multimodal] hit: hierarchical transformer with momentum contract for video text retrieval iccv 2021
马斯克的“灵魂永生”:一半炒作,一半忽悠