要求从表中找出工资相等的人的名字,不考虑重复??
------解决方案--------------------
你是指什么?给定一个工资,找到工资相等的其他用户名?
select username from salary where pay = xxx
就可以
如果你指所有相同工资的人,可以这样
select username, pay from salary where pay in (select pay from salary group by pay having count(*) >= 2)
代码迷推荐解决方案:软件开发者薪资,http://www.daimami.com/other/1391128.html