How to display that record with sql query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tekchand sharma
    New Member
    • Sep 2013
    • 1

    How to display that record with sql query

    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.....
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    I have no idea what you are asking... Some sample data and results would be helpful along with a clearer description.

    Comment

    • hr007
      New Member
      • Sep 2013
      • 2

      #3
      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.

      Comment

      Working...