Click here to Skip to main content
14,869,839 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table name employee, which have a field name salary.
I want to display only those employees salery, who earned salary that is multiple of 3.

Please help me.

Thank you in advance.
Updated 17-Oct-11 21:56pm
[no name] 17-Oct-11 13:44pm
What have you tried?
Amir Mahfoozi 29-Oct-11 7:45am
why the salary is in another table ? so we should SUM salaries or COUNT salaries or what ? I think something is missed in your question :-?

select username,salery from employee where salery % 3 = 0
CPallini 18-Oct-11 3:58am
So, 0 is a multiple of 3, isn't it?
Mehdi Gholam 18-Oct-11 4:19am
Well you would want to know who you are not paying wouldn't you!? :)
select empname,sal from employee where sal>0 and (sal % 3 = 0)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900