Redian新闻
>
MySQL row selection question
avatar
MySQL row selection question# Database - 数据库
e*l
1
Can I select a specific row from the a table according to index, without cre
ating a field for index?
Say, the 1st row, the 331st row, or 52nd row.
I have a data vector with around 200,000,000 elements and want to store it i
n MySQL. The table should be as small as possible.
Thanks.
avatar
I*e
2
Create an InnoDB table with your ID as the primary key. Then, you do not
need another index. Is this what you want?
avatar
e*l
3
But I still have to create a field for the ID, right?
Or the first will natural have an id of "1"? if so, how should I call this p
roperty?

【在 I******e 的大作中提到】
: Create an InnoDB table with your ID as the primary key. Then, you do not
: need another index. Is this what you want?

avatar
I*e
4
Then, you should use auto_increment on ID, work for you?
avatar
e*l
5
Thanks. It worked.

【在 I******e 的大作中提到】
: Then, you should use auto_increment on ID, work for you?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。