当前位置:网站首页>[Sql brush topic] Query information data--Day1
[Sql brush topic] Query information data--Day1
2022-08-04 19:04:00 【stair jumping penguin】
目录
Inquire about the students of the specified school
Find students of a specified age
Query students of a specified age group
Search for students at a given university

前言
数据库技术是通过研究数据库的结构、存储、设计、管理以及应用的基本理论和实现方法,并利用这些理论来实现对数据库中的数据进行处理、分析和理解的技术.即:数据库技术是研究、管理和应用数据库的一门软件科学.其中mysqlIt is a very hot database.
Query information data
Inquire about the students of the specified school
思路:We already know the information about the database,可以看到是存在5confidence,And there is little repetition of the same information.Then we can think,If we can try to specify the table name,Then specify the table name学校信息查询,然后输入指定的id这样就可以了,Then let's experiment.
题目描述:
代码:
SELECT device_id,university
FROM user_profile
WHERE university="北京大学"结果

Find students of a specified age
思路:We already know the information about the database,可以看到是存在5confidence,And there is little repetition of the same information.Then we can think,If we can try to specify the table name,Then specify the table name年龄信息查询,然后输入指定的id这样就可以了,Then let's experiment.
题目描述:

代码:
SELECT device_id,gender,age,university
FROM user_profile
WHERE age>24;结果:

Query students of a specified age group
思路:We already know the information about the database,可以看到是存在5confidence,And there is little repetition of the same information.Then we can think,If we can try to specify the table name,Then specify the table name年龄范围查询,然后输入指定的id这样就可以了,Then let's experiment.
题目描述:

代码:
SELECT device_id,gender,age from user_profile where age between 20 and 23结果:

Search for students at a given university
思路:We already know the information about the database,可以看到是存在5confidence,And there is little repetition of the same information.Then we can think,If we can try to specify the table name,Then specify the table nameRemove school enquiries,然后输入指定的id这样就可以了,Then let's experiment.
题目描述:

代码:
select device_id,gender,age,university
from user_profile
where university != '复旦大学'结果:

小结
Brushing questions is very helpful for us to familiarize ourselves with and consolidate the content of knowledge points.
点击右边链接 刷题链接
边栏推荐
猜你喜欢
随机推荐
CIFAR发布《AI伦理的文化:研讨会报告》【附下载】
”元宇宙“必须具备这些特点
将网页变成字符串,并保存起来
Scala104 - Built-in datetime functions for Spark.sql
Redis数据库—定义、特点、安装、如何启动与停止
EuROC dataset format and related codes
使用.NET简单实现一个Redis的高性能克隆版(二)
win10 uwp xaml 绑定接口
win10 uwp MVVM 轻量框架
元国度链游系统开发
浅谈web网站架构演变过程
win10 uwp MVVM 语义耦合
PHP代码审计9—代码执行漏洞
win10 uwp MetroLog 入门
测试工程师如何突破职业瓶颈?
【最新资讯】2022下半年软考新增2个地区公布报名时间
VPC2187/8 current mode PWM controller 4-100VIN ultra-wide voltage startup, highly integrated power control chip recommended
Dragoma(DMA)元宇宙系统开发
切换node版本和切换npm源工具
如何理解 SAP UI5 的 sap.ui.define 函数








