当前位置:网站首页>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 .
边栏推荐
- Optimization of video streaming with repeated requests in the case of unstable easygbs network
- New window open page -window open
- DS transunet: Dual Swing transformer u-net for medical image segmentation
- Install redis under Linux and configure the environment
- Interview question 16.16 Partial sorting - Double finger needling
- HLS4ML报错The board_part definition was not found for tul.com.tw:pynq-z2:part0:1.0.
- Modsim basic use (Modbus simulator)
- Live HLS protocol
- 【多线程】锁策略
- 为定时器和延时器等其它情况的回调函数绑定当前作用域的this
猜你喜欢
Interview questions shared in today's group
音视频、编解码相关电子书、小工具,打包奉送!
Object creation
Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, builds an open source ecological road
实例讲解将Graph Explorer搬上JupyterLab
Basic use of MySQL
全国职业院校技能大赛网络安全“splunk“详细配置
Regular expression =regex=regular expression
科技T3国产平台!成功搭载“翼辉国产实时系统SylixOS”
Crunch简介、安装,使用Crunch制作密码字典
随机推荐
较真儿学源码系列-InheritableThreadLocal(逐行源码带你分析作者思路)
[exercise] HashSet
JDBC中如何添加事务
Image acquisition and playback of coaxpress high speed camera based on pxie interface
振弦采集模块测量振弦传感器的流程步骤
Interview questions shared in today's group
Object creation
Botu V16 obtains the system time and converts it into a string
Procédure de mesure du capteur d'accord vibrant par le module d'acquisition d'accord vibrant
Process steps of vibrating wire acquisition module for measuring vibrating wire sensor
Basic use of MySQL
HLS4ML进入方法
Crunch简介、安装,使用Crunch制作密码字典
[research materials] national second-hand housing market monthly report January 2022 - Download attached
自定义插入页面标签以及实现类似通讯录的首字母搜索
JS proxy
Battery simulation of gazebo robot
[untitled]
Unreal Engine packaging project
Interview question 1