当前位置:网站首页>SQL getting started plan-1-select
SQL getting started plan-1-select
2022-07-01 19:48:00 【Southern Chu Lich】
So let's start here , Will learn how to master Leetcode Medium SQL subject , There are two versions of each topic, the original and the variant , Consolidate learning , Improve my ability in practice .
1 choice
The original version :

therefore , The answer to this question should be as follows :
First step :
New database 
The second step ,
Create data table :
CREATE TABLE world(
name INT NOT NULL AUTO_INCREMENT,
continent VARCHAR(100) ,
area INT NOT NULL ,
population INT NOT NULL ,
gdp INT NOT NULL ,
PRIMARY KEY (name)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
ad locum ,SQL Middle primary key name The value type of is inconsistent with the real value type .
Insert relevant data

INSERT INTO world
(name, continent, area, population, gdp)
VALUES
(1, "a", 3000000,25000000,10);
INSERT INTO world
(name, continent, area, population, gdp)
VALUES
(2, "a", 1000000,15000000,10);
INSERT INTO world
(name, continent, area, population, gdp)
VALUES
(3, "a", 4000000,45000000,10);
INSERT INTO world
(name, continent, area, population, gdp)
VALUES
(4, "a", 5000000,65000000,10);
INSERT INTO world
(name, continent, area, population, gdp)
VALUES
(5, "a", 1000000,5000000,10);
INSERT INTO world
(name, continent, area, population, gdp)
VALUES
(6, "a", 1000000,25000000,10);
INSERT INTO world
(name, continent, area, population, gdp)
VALUES
(7, "a", 13000000,14000000,10);
Write a query SQL The sentence of , Get feedback .
Query results
This question is suitable for , Query two fields larger than / Less than / A table equal to a certain value .
For example, I can create a table , Query the situation that a value in the table is too large .
边栏推荐
猜你喜欢

Interview question 1

Optaplanner learning notes (I) case cloud balance

【无标题】

Interview questions shared in today's group

解决VSCode下载慢或下载失败的问题

为定时器和延时器等其它情况的回调函数绑定当前作用域的this

Crunch简介、安装,使用Crunch制作密码字典

JVM memory model

Uni app wechat applet one click login to obtain permission function

After studying 11 kinds of real-time chat software, I found that they all have these functions
随机推荐
optaplanner学习笔记(一)案例Cloud balance
Battery simulation of gazebo robot
Use the uni app demo provided by Huanxin to quickly realize one-on-one chat
SIP protocol of gb28181
Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
为定时器和延时器等其它情况的回调函数绑定当前作用域的this
有意思了!数据库也搞Serverless!
全国职业院校技能大赛网络安全“splunk“详细配置
Is Dao safe? Build finance encountered a malicious governance takeover and was looted!
Nat penetration of gb28181
Example explanation: move graph explorer to jupyterlab
【let var const】
ffmpeg AVFrame 转 cv::Mat
Interview question 16.16 Partial sorting - Double finger needling
新增订单如何防止重复提交
DTD modeling
118. Yanghui triangle
[untitled]
Basic use of MySQL
[research data] observation on the differences of health preservation concepts among people in 2022 - Download attached