首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
秋天的震撼已经感受到了😅😅😅
获赞
76
粉丝
3
关注
6
看过 TA
179
门头沟学院
2024
运营
IP属地:江苏
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑秋天的震撼已经感受到了😅😅😅吗?
发布(82)
评论
刷题
收藏
秋天的震撼已经感受到了😅😅😅
关注TA,不错过内容更新
关注
2023-11-20 10:50
已编辑
门头沟学院 运营
题解 | 显然GPT写的更完美
/* update titles_test set to_date=NULL,from_date='2001-01-01' where to_date='9999-01-01'; */ -- 自己写的 UPDATE titles_test SET to_date = CASE WHEN to_date = '9999-01-01' THEN NULL ELSE to_date END, from_date = '2001-01-01' WHERE to_date = '9999-01-01'; -- gpt写的
0
点赞
评论
收藏
分享
2023-11-19 11:58
门头沟学院 运营
题解 | 越到后面越是这种题越不会
delete t1 from titles_test t1 inner join titles_test t2 where t1.emp_no=t2.emp_no and t1.id>t2.id; select * from titles_test;
0
点赞
评论
收藏
分享
2023-11-19 11:29
门头沟学院 运营
题解 | #构造一个触发器audit_log#
create trigger audit_log after insert on employees_test for each row begin insert into audit (EMP_no,NAME) VALUES (NEW.ID,NEW.NAME); END
0
点赞
评论
收藏
分享
2023-11-19 10:23
门头沟学院 运营
题解 |
ALTER TABLE actor ADD COLUMN create_date datetime NOT NULL DEFAULT '2020-10-01 00:00:00' AFTER last_update;
0
点赞
评论
收藏
分享
2023-11-18 11:24
门头沟学院 运营
题解 | 索引这一块需要加强
select * from salaries force index (idx_emp_no) where emp_no=10005
0
点赞
评论
收藏
分享
2023-11-18 10:39
门头沟学院 运营
题解 | 这段知识完全没学过
CREATE VIEW actor_name_view AS SELECT first_name AS first_name_v, last_name AS last_name_v FROM actor; SELECT * FROM actor_name_view;
0
点赞
评论
收藏
分享
2023-11-18 10:23
门头沟学院 运营
题解 | 创建索引
alter table `actor` add unique index uniq_idx_firstname(first_name), add index idx_lastname(last_name) 不得不感叹与人工智能的强大
0
点赞
评论
收藏
分享
2023-11-18 09:37
门头沟学院 运营
题解 |
create table if not exists `actor_name` (`first_name` varchar(45) not null, `last_name` varchar(45) not null); insert into actor_name select first_name,last_name from actor; 这段代码的目的是创建一个新表actor_name(如果它尚未存在),然后将actor表中的演员名字复制到新表中。
0
点赞
评论
收藏
分享
2023-11-17 23:54
门头沟学院 运营
题解 | #批量插入数据,不使用replace操作#
insert ignore into `actor` (`actor_id`,`first_name`,`last_name`,`last_update`) values ('3','ED','CHASE','2006-02-15 12:34:33') mysql中常用的三种插入数据的语句:insert into表示插入数据,数据库会检查主键,如果出现重复会报错;replace into表示插入替换数据,需求表中有PrimaryKey,或者unique索引,如果数据库已经存在数据,则用新数据替换,如果没有数据效果则和insert into一样;insert ignore表示,如果中已经存在相同...
0
点赞
评论
收藏
分享
2023-11-17 23:44
门头沟学院 运营
题解 | 表格名→表头名→值
insert into `actor` (`actor_id`,`first_name`,`last_name`,`last_update`) values ('1','PENELOPE','GUINESS','2006-02-15 12:34:33') , ('2','NICK','WAHLBERG','2006-02-15 12:34:33')
0
点赞
评论
收藏
分享
2023-11-16 11:33
门头沟学院 运营
题解 | #创建一个actor表,包含如下列信息#
create table `actor`( actor_id smallint(5) not null,#主键id first_name varchar(45) not null,#名字 last_name varchar(45) not null,#姓氏 last_update date not null, #日期 primary key (actor_id) )
0
点赞
评论
收藏
分享
2023-11-16 11:24
门头沟学院 运营
题解 | 审题
select concat(last_name,' ',first_name) name from employees
0
点赞
评论
收藏
分享
2023-11-16 11:11
门头沟学院 运营
题解 | 草稿纸上梳理一遍一目了然
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 name = 'Action' ) )
0
点赞
评论
收藏
分享
2023-11-15 10:57
门头沟学院 运营
题解 | 先试错,后改错
select f.film_id,f.title from film f left join film_category fc on f.film_id=fc.film_id left join category c on fc.category_id=c.category_id where c.category_id is null
0
点赞
评论
收藏
分享
2023-11-15 10:44
门头沟学院 运营
题解 | 对多个条件分组聚合在order by后用','隔开
select de.dept_no, dp.dept_name dept_name, tl.title title, count(tl.title) count from dept_emp de join titles tl on de.emp_no = tl.emp_no left join departments dp on de.dept_no = dp.dept_no where de.to_date = '9999-01-01' group by de.dept_no, tl.title order by de.dept_no, tl.title
0
点赞
评论
收藏
分享
1
2
3
4
5
6
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客企业服务