I’m new to SQL, and need to get the rows that have ID’s greater/equal to 5 and less than/equal to 10. Is there SQL that can handle this, or should I use PHP?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Thats the cool thing about SQL. Its syntax is close to our language. You see I pretty much typed exactly what you asked for.
Also in
T-SQLthe BETWEEN operator would include Both 5 and 10 and do the exact same thing as the previous example. From there it’s your choice.