秋天的震撼已经感受到了😅😅😅
秋天的震撼已经感受到了😅😅😅
全部文章
分类
归档
标签
去牛客网
登录
/
注册
秋天的震撼已经感受到了😅😅😅的博客
全部文章
(共80篇)
题解 | length 返回字符串字符长度
SELECT id,length(string)-length(replace(string,',','')) cnt FROM strings
SQL错题
2023-11-22
0
229
题解 | #将所有获取奖金的员工当前的薪水增加10%#
UPDATE salaries SET salary = salary * 1.1 WHERE to_date = '9999-01-01' AND emp_no IN (SELECT emp_no FROM emp_bonus);
SQL错题
2023-11-21
0
227
题解 | 创建外键约束
ALTER TABLE audit ADD CONSTRAINT fk_emp_no FOREIGN KEY (EMP_no) REFERENCES employees_test(ID);
SQL错题
2023-11-21
1
256
题解 | rename
rename table titles_test to titles_2017
SQL错题
2023-11-20
0
217
题解 | replace
replace into titles_test(id,emp_no,title,from_date,to_date) values ('5', '10005', 'Senior Engineer', '1986-06-26', '9999-01-01')
SQL错题
2023-11-20
2
268
题解 | 显然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 ...
SQL错题
2023-11-20
1
272
题解 | 越到后面越是这种题越不会
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;
SQL错题
2023-11-19
1
252
题解 | #构造一个触发器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
SQL错题
2023-11-19
1
286
题解 |
ALTER TABLE actor ADD COLUMN create_date datetime NOT NULL DEFAULT '2020-10-01 00:00:00' AFTER last_update;
SQL错题
2023-11-19
0
325
题解 | 索引这一块需要加强
select * from salaries force index (idx_emp_no) where emp_no=10005
SQL错题
2023-11-18
2
314
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页