简体   繁体   English

mysql使用自动增量ID选择一定范围

[英]mysql select a certain range using autoincrement ID

I need to select a certain range of a table, say #1000~5000 using the auto increment ID. 我需要使用自动增量ID选择一个表的某个范围,例如#1000〜5000。 What should the syntax be? 语法应该是什么?

SELECT column1, column2 FROM table WHERE columnID BETWEEN 1000 and 5000

SELECT * FROM table WHERE id BETWEEN 1000 AND 5000

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM