ok Posted August 15, 2008 Share Posted August 15, 2008 ok let say i have 10 records and it has auto increment id. now i want to select only the odd numbers of the id? example: id: 1, 3, 5, 7, 9 how can i do this using SELECT? thank you in advance. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted August 15, 2008 Share Posted August 15, 2008 Well, not sure if there is a better way. But you can do this: SELECT * FROM tablename WHERE id%2=1 Then instead of 1 have 0 for even. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.