超过经理收入的员工
- 题目如下所示
个人题解
这题也很简单,如下 SQL 所示
-- 建表
CREATE TABLE employee (
id INT PRIMARY KEY,
name VARCHAR(10),
salary INT,
managerId INT
);
-- 编写一个SQL查询来查找收入比经理高的员工。以 任意顺序 返回结果表。
SELECT e.`name` Employee FROM 181_employee e, 181_employee m WHERE e.managerId = m.id AND e.salary > m.salary
标签:salary,INT,经理,员工,181,employee
From: https://www.cnblogs.com/OnlyOnYourself-lzw/p/17544653.html