By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,729 Members | 1,343 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,729 IT Pros & Developers. It's quick & easy.

How to display that record with sql query

P: 1
I have a table .that table record.
1-Name 2-Salery
if have 100 record that table.
firstly salery should be assending order.
then display only
1,3,5,7,9.....
Sep 5 '13 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,430
I have no idea what you are asking... Some sample data and results would be helpful along with a clearer description.
Sep 5 '13 #2

P: 2
Do you mean to say there is a table named "Employee Salary" and it has two columns - Name and Salary. You need to display only the salary values which are odd (1,3,5,7 etc) and in ascending order? If yes, below is the query -

Assuming EmployeeSalary to be the table name and Salary to be the column name -

Select * from EmployeeSalary where Salary%2 <> 0
order by salary asc

If you are looking for something else, please write in detail.
Sep 5 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.