上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 94 下一页
摘要: 简介 删除emp_no重复的记录,只保留最小的id对应的记录。 DELETE FROM titles_test where id not in( select * from( select MIN(id) from titles_test group by emp_no )as a ) 阅读全文
posted @ 2021-07-01 11:34 HDU李少帅 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 简介 修改数据 update titles_test set emp_no = replace(emp_no, 10001, 10005) where id = 5; update titles_test set to_date = NULL, from_date ='2001-01-01' whe 阅读全文
posted @ 2021-07-01 11:30 HDU李少帅 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 简介 alter table titles_test rename to titles_2017; 阅读全文
posted @ 2021-07-01 11:17 HDU李少帅 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 简介 having 的使用考察 select number from grade group by number having count(number) >= 3; 阅读全文
posted @ 2021-07-01 11:13 HDU李少帅 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 简介 left join select a.id, a.name, b.content from person as a left join task as b on b.person_id = a.id order by a.id; 阅读全文
posted @ 2021-07-01 11:12 HDU李少帅 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 简介 简单 select user_id, max(date) from login group by user_id order by user_id; 阅读全文
posted @ 2021-07-01 11:04 HDU李少帅 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 简介 使用 round 与 avg select job, round(avg(score),3) as avg from grade group by job order by avg desc; 阅读全文
posted @ 2021-07-01 11:00 HDU李少帅 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 简介 使用 多个 and 并列 select * from order_info where date > "2025-10-15" and status = "completed" and product_name in("C++","Java","Python") order by id; 阅读全文
posted @ 2021-07-01 10:50 HDU李少帅 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 简介 select job, sum(num) as cnt from resume_info where resume_info.date < '2026-01-01' and resume_info.date >= '2025-01-01' group by job order by cnt d 阅读全文
posted @ 2021-07-01 10:49 HDU李少帅 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 简介 order by 然后 limit select * from employees order by hire_date desc limit 1; 阅读全文
posted @ 2021-07-01 10:36 HDU李少帅 阅读(62) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 94 下一页