how to write the query to select the rows are in the order
of either 1,3,5,7... or 2,4,6,8,...
Answer Posted / md. niyaz
For: 2, 4, 6, ......
select * from <Table_Name> where <Column_Name> % 2 = 0
==============Niyaz====================================
For: 1, 3, 5, ......
select * from <Table_Name> where <Column_Name> % 2 = 1
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is the difference between inner join and equi join?
What are the different authentication modes in sql server? How can it be changed?
What is an inner join?
Explain what are the authentication modes in sql server?
Is sql server is free?
What is the difference between DataRow.Delete() and DataRow.Remove()?
What is index fragmentation in ms sql server?
Can we write ddl in trigger?
What is normalization and denormalization in sql server?
List some major differences between triggers and stored procedures?
What is BCP? When does it used in sql server 2012?
what is the system function to get current user's user id? : Sql server database administration
What is the difference between Triggers and Stored Procedure?
Explain transaction isolation levels in sql server?
Do you know what are the restrictions that views have to follow?