Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两张表 Employee 和 Grade,想要第三张表(即输出表)这样的输出?如果可能的话,那怎么办?
你可以试试这个
select e.name , g.grade from employeetable e, gradetable g where e.salary >= g.min and e.salary <= g.max
尝试这个
SELECT E.Name ,(SELECT G.Grade FROM Grade G WHERE E.Salary BETWEEN G.Min AND G.Max) FROM Employee E