Their are many approaches to get alternate record from SQL server database table. Here i have discussed 2 approaches
1. Complex Query
2. Using Views
Complex Query: SELECT * from (SELECT ROW_NUMBER() OVER(ORDER BY Employee_id) as RowNumber, * from employees) T where t.RowNumber%2=0
Using Views:
CREATE VIEW with_rownumber
as
SELECT ROW_NUMBER() OVER(ORDER BY Employee_id) as RowNumber,* from employees;
SELECT * from with_rownumber where RowNumber%2=0
The approach preferred here is using VIEW because:
1. Easy to understand.
2. In future if you need to perform any operation related to RowNumber
then you don't need to create another complex query. You could use view
having rownumber column in it.
Ο/Η Dan λέει:Dear Admin,some friends alrteed us your site used all our photos (that we posted in another amateur site) without our permissions.this is the gallery Please remove them!!!Probably you didn’t know it and maybe a very bad member of your site used it without you know it, but me and my wife don’t allow this.We wait your reply as soon as possible!Thanks for understandingD&A
Google search,Google tricks,restrict Google search,Free book search,search Ftp directly,search directory,search direct link rapidshare,search torrent directly