当前位置:网站首页>Niuke brush questions - MySQL series
Niuke brush questions - MySQL series
2022-07-26 21:11:00 【Xiao Wang who learns C language well】
Preface
Author's brief introduction : Hello, friends , I'm your classmate Xiao Wang
Personal home page : Xiao Wang
Series column : Niu Ke brushes the question column
Recommend a very popular interview 、 Brush Title artifact Cattle from
What I think Xiao Wang wrote is good Please use your hands give the thumbs-up Collection Comment on
Today's question brushing series is :
Mysql series mysql Direct link of question brushing mysql Brush problem



There are many question banks Knowledge of heel Sutra I really have a good conscience !!
Title Description
Query all columns _ Niuke Tiba _ Cattle from (nowcoder.com)

Their thinking
This way sql There are two solutions to the problem
1.SELECT * from user_profile;
2.SELECT id,device_id,gender,age,university,province from user_profile;
If you compare the performance recommend The second kind
Code details
SELECT * from user_profile;SELECT id,device_id,gender,age,university,province from user_profile; 
too spicy !!~~
Title Description
Query multiple columns _ Niuke Tiba _ Cattle from (nowcoder.com)

Their thinking
This question is based on the requirements of the question Put the query column Just list the queries one by one
Code details
select
device_id,gender,age,university
from user_profile;
Too spicy ~~
Title Description
Query result de duplication _ Niuke Tiba _ Cattle from (nowcoder.com)

Their thinking
use DISTINCT Keyword can remove duplicate lines in the result .
DISTINCT Keywords in SELECT Behind the word 、 The front of the target column name sequence .
Code details
select distinct university from user_profile;
Too spicy ~~
Niuke is an interview Or brush the questions It's all very useful What are you waiting for? Register it ! Niu Ke brush questions
边栏推荐
- 立即报名:7 月 29 日推荐系统峰会 2022
- Shell function, system function, basename [string / pathname] [suffix] can be understood as taking the file name in the path, dirname file absolute path, and user-defined function
- Redis interview questions
- idea中检索此方法中有哪些参数以便我们使用——1.类图。2.双击shift
- 苹果官网罕见打折,iPhone13全系优惠600元;国际象棋机器人弄伤对弈儿童手指;国内Go语言爱好者发起新编程语言|极客头条
- PointPillars: Fast Encoders for Object Detection from Point Clouds 阅读笔记
- Introduction of JDBC
- 【问题篇】浏览器get请求带token
- 09_ue4进阶_进入下一关并保留血量
- Soft test --- database (1) database foundation
猜你喜欢

idea中检索此方法中有哪些参数以便我们使用——1.类图。2.双击shift

每日练习------有一组学员的成绩,将它们按降序排列,要增加一个学员的成绩,将它插入成绩序列,并保持降序

09_ UE4 advanced_ Enter the next level and reserve the blood volume

Leetcode linked list problem -- 24. Exchange the nodes in the linked list in pairs (learn the linked list with one question and one article)

Use Baidu PaddlePaddle easydl to complete garbage classification

How to block the legendary GEE engine version? Close player account tutorial through script + engine

和月薪3W的字节程序员聊过后,才知道自己一直在打杂...

Leetcode linked list problem - 19. Delete the penultimate node of the linked list (learn the linked list with one question and one article)
![Installation and configuration of [basic services] [database] Clickhouse](/img/fe/5c24e4c3dc17a6a96985e4fe97024e.png)
Installation and configuration of [basic services] [database] Clickhouse

LeetCode链表问题——19.删除链表的倒数第N个节点(一题一文学会链表)
随机推荐
Green and sustainable development of data center
Shell comprehensive application cases, archive files
Apaas low code platform (I) | leave complexity to yourself and simplicity to users
手机\固定电话座机呼叫转移设置方法
游览器——游览器游览器缓存
Correlation analysis between [machine learning] variables
SprinBoot面试题
Leetcode array class
What kind of security problems will the server encounter?
AI technology, simplifying the complex world | teatalk online application practical series, issue 2
idea中设置核心配置文件的模板
[JVM series] JVM tuning
leetcode 哈希表类
JVM learning - memory structure - program counter & virtual machine stack & local method stack & heap & method area
7-year-old boy playing chess too fast? The robot actually broke its finger
[pytoch foundation] torch.stack() function analysis
Relevant contents about wireless communication
We were tossed all night by a Kong performance bug
自定义注解(一)
Today, the company came across an Alibaba P8, which was really seen as the ceiling of the foundation