sky丶Mamba2
sky丶Mamba2
全部文章
题解
c++(1)
c语言(2)
Java后端(1)
mysql(2)
PAT(1)
PAT (Basic Level)(76)
其它(5)
大学文档(7)
数据分析(6)
社区发现(1)
算法(1)
归档
标签
去牛客网
登录
/
注册
sky丶Mamba2的博客
全部文章
/ 题解
(共80篇)
题解 | 36#创建一个actor_name表#
来自专栏
create table actor_name (select first_name,last_name from actor)思路:用现有表的数据构建新表
2021-08-05
0
325
题解 | 35#批量插入数据,不使用replace操作#
来自专栏
insert ignore into actor values (3, 'ED', 'CHASE', '2006-02-15 12:34:33')思路:掌握insert ignore 语句的意思就好了
2021-08-04
0
311
题解 | 38#针对actor表创建视图actor_name_view#
来自专栏
create view actor_name_view as select first_name as first_name_v, last_name as last_name_v from actor思路:掌握创建视图的语句就好了
2021-08-04
0
350
题解 | 30#使用子查询的方式找出属于Action分类的所有电影对应的title,description#
来自专栏
select title, description from film where film_id in (select film_id from film_category where category_id in (select category_id from category where ...
2021-08-04
0
386
题解 | 15#查找employees表emp_no与last_name的员工信息#
来自专栏
select * from employees where emp_no%2 = 1 and last_name <> 'Mary' order by hire_date desc思路:对emp_no利用取余进行奇偶判断
2021-08-04
0
333
题解 | 53#按照dept_no进行汇总#
来自专栏
select dept_no, group_concat(emp_no) as employees from dept_emp group by dept_no 思路:了解group_concat()函数就会做了,聚合函数group_concat(X,Y),其中X是要连接的字段,Y是连接时用的符号,...
2021-08-03
0
357
题解 | 62#出现三次以上相同积分的情况#
来自专栏
select number from grade group by number having count(number)>=3思路:使用group by 加 having 实现,注意不能在where里面写聚合函数。
2021-08-03
0
389
题解 | 43#将所有to_date为9999-01-01的全部更新为NULL#
来自专栏
update titles_test set to_date = null, from_date = '2001-01-01' where to_date = '9999-01-01'思路:使用update,set语句,注意字符型数据加单引号。
2021-08-03
0
432
题解 | 8#找出所有员工当前薪水salary情况#
来自专栏
select distinct salary from salaries order by salary desc;思路:题目很简单,利用distinct去重
2021-08-03
3
267
题解 | 44#将id=5以及emp_no=10001的行数据替换成id=5以及emp_no=10005#
来自专栏
UPDATE titles_test SET emp_no = REPLACE(emp_no, 10001, 10005) WHERE id = 5;注意使用update关键字,使用条件id=5,然后使用replace替换
2021-08-03
0
370
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页