![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
还是个宝宝
这个作者很懒,什么都没留下…
展开
-
牛客t12 group by后默认取每组第一个值
select e.dept_no,e.emp_no,max(salary) from dept_emp e,salaries s where e.emp_no=s.emp_no group by e.dept_no 吧 order by e.dept_no asc group by后默认取每组第一个值 利用窗口函数: select sma.dept_no,sma.emp_no,sma.salary from( select e.dept_no,e.emp_no,原创 2021-11-22 15:20:20 · 1587 阅读 · 0 评论 -
1822 - Failed to add the foreign key constraint. Missing index for constraint
外键必须是主键 默认条件为: 外键参考的表必须有主键原创 2021-11-16 14:48:53 · 1652 阅读 · 0 评论