当前位置:网站首页>牛客刷题——Mysql系列
牛客刷题——Mysql系列
2022-07-26 20:16:00 【学好c语言的小王同学】
前言
作者简介:友友们大家好,我是你们的小王同学
个人主页:小王同学
系列专栏:牛客刷题专栏
推荐一款非常火的面试、刷题神器牛客网
觉得小王写的不错的话 麻烦动动小手 点赞 收藏 评论
今天给大家带来的刷题系列是:
Mysql 系列 mysql刷题链接直达 mysql刷题



里面有非常多的题库 跟面经知识 真的非常良心了!!
题目描述

解题思路
这道sql题有两种解法
1.SELECT * from user_profile;
2.SELECT id,device_id,gender,age,university,province from user_profile;
如果比较性能的话 推荐第二种
代码详解
SELECT * from user_profile;SELECT id,device_id,gender,age,university,province from user_profile; 
过 辣!!~~
题目描述

解题思路
这道题根据题目要求 把查询的列 一一列出查询即可
代码详解
select
device_id,gender,age,university
from user_profile;
过过过辣~~
题目描述
查询结果去重_牛客题霸_牛客网 (nowcoder.com)

解题思路
用DISTINCT关键字可以去掉结果中的重复行。
DISTINCT关键字放在SELECT词的后边、目标列名序列的前边。
代码详解
select distinct university from user_profile;
过过过辣~~
牛客是一款不论是面试 还是刷题 都是非常有用的 还等什么注册其来吧! 牛客刷题
边栏推荐
- 09_ue4进阶_进入下一关并保留血量
- JDBC connection
- 手机\固定电话座机呼叫转移设置方法
- Go+mysql+redis+vue3 simple chat room, the sixth bullet: use vue3 and element plus to call the interface
- How to configure the legendary SF lander to automatically read the list without a network
- SSM integration example
- 今天公司碰到一个阿里p8,算是真正见识到了基础的天花板
- Monitor MySQL based on MySQL exporter
- [JVM series] JVM tuning
- LeetCode_ Backtracking_ Medium_ 40. Combined sum II
猜你喜欢

传奇GEE引擎版本如何封挂?通过脚本+引擎封玩家账号教程

Flutter Performance Optimization Practice - UI chapter

Rare discounts on Apple's official website, with a discount of 600 yuan for all iphone13 series; Chess robot injured the fingers of chess playing children; Domestic go language lovers launch a new pro

idea中设置核心配置文件的模板

7-year-old boy playing chess too fast? The robot actually broke its finger

flask 源码梗概

QT基础第一天 (1)QT,GUI(图形用户接口)开发
![[must read new] Keya valuation analysis of University of technology, heating energy-saving products](/img/e8/c3ac4e5f11db58031cb9249a4ba0f4.jpg)
[must read new] Keya valuation analysis of University of technology, heating energy-saving products

Shell综合应用案例,归档文件

APaaS低代码平台(一) | 把复杂留给自己,把简单留给用户
随机推荐
Leetcode hash table class
[JVM series] JVM tuning
Monitor MySQL based on MySQL exporter
服务器的防护会遇到什么样的安全问题呢?
JVM学习----内存结构----程序计数器&虚拟机栈&本地方法栈&堆&方法区
Buu brush inscription 2
LeetCode链表问题——19.删除链表的倒数第N个节点(一题一文学会链表)
What is the function of the serializable interface?
Kotlin - coroutinecontext
Establishment of APP automation testing framework (VIII) -- establishment of ATX server2 multi device cluster environment
idea中设置核心配置文件的模板
GOM and GEE lander list file encryption tutorial
How to upload and download files
Soft test --- database (1) database foundation
LeetCode链表问题——24.两两交换链表中的结点(一题一文学会链表)
Redis面试题
Daily practice ----- there is a group of students' grades. Arrange them in descending order. To add a student's grade, insert it into the grade sequence and keep the descending order
[ffmpeg] add timestamp summary to video files
PLSQL package
Robin Lee was "poured cold water" enthusiasm! Baidu allied with Huawei Kirin to release "Honghu" chip