牛客752205773号
牛客752205773号
全部文章
分类
题解(55)
归档
标签
去牛客网
登录
/
注册
牛客752205773号的博客
全部文章
(共42篇)
题解 | #将所有获取奖金的员工当前的薪水增加10%#
update salaries set salary=salary*1.1 where to_date='9999-01-01' and salaries.emp_no in(select emp_no from emp_bonus)
Mysql
2022-06-23
0
231
题解 | #删除emp_no重复的记录,只保留最小的id对应的记录。#
DELETE FROM titles_test WHERE id NOT IN( SELECT * FROM( SELECT MIN(id) FROM titles_test GROUP BY emp_no)a); -- 把得出的表重命名那就不是原表了(机智.jpg
Mysql
2022-06-23
0
228
题解 | #构造一个触发器audit_log#
create trigger audit_log after # 监视时间 insert on employees_test # 监视事件 for each row begin insert into audit values(new.id,new.name); # 触发事件 使用新列数据...
Mysql
2022-06-23
0
249
题解 | #在last_update后面新增加一列名字为create_date#
alter table actor add column create_date datetime not null default '2020-10-01 00:00:00' after last_update
Mysql
2022-06-23
0
230
题解 | #对first_name创建唯一索引uniq_idx_firstname#
CREATE UNIQUE INDEX uniq_idx_firstname ON actor (first_name); CREATE INDEX idx_lastname ON actor (last_name); 或 alter table actor add unique uniq_idx_...
Mysql
2022-06-23
2
255
题解 | #创建一个actor_name表#
create table If not exists actor_name( first_name varchar(45) not null, last_name varchar(45) not null); insert into actor_name value('PENELOPE','GUIN...
Mysql
2022-06-23
0
234
题解 | #批量插入数据#
insert into actor value(1,'PENELOPE', 'GUINESS', '2006-02-15 12:34:33'), (2,'NICK', 'WAHLBERG', '2006-02-15 12:34:33');
Mysql
2022-06-23
1
251
题解 | #创建一个actor表,包含如下列信息#
create table actor( actor_id smallint(5) primary key, first_name varchar(45) not null, last_name varchar(45) not null, last_update date not null)
Mysql
2022-06-23
0
190
题解 | #使用子查询的方式找出属于Action分类的所有电影对应的title,description#
select t.title,t.description from film t where t.film_id in (select t2.film_id from category t1 right join fil...
Mysql
2022-06-23
0
303
题解 | #使用join查询方式找出没有分类的电影id以及名称#
select t1.film_id,t1.title from film_category t right join film t1 on t.film_id=t1.film_id where t.film_id is null
Mysql
2022-06-23
0
293
首页
上一页
1
2
3
4
5
下一页
末页