I have Visual Basic 8.0 and Use Mysql 5.0 Database
Table Test:
Field type
ID Integer (PRIMARY KEY)
Name Char(10)
Adress Char(15)
City Char(15)
ID Name Adress City
1 Andre Street 1 New York
2 John Street 2 Amsterdam
3. Joyce Street 3 Londen
I have create a index on Column City:
CREATE INDEX CityIndex ON test (city)
I have now Select all record with the Index CityIndex Then the displayed list is still sorted on the PRIMARY key:
Select * from test use index (CityIndex)
I get this list:
ID Name Adress City
1 Andre Street 1 New York
2 John Street 2 Amsterdam
3. Joyce Street 3 Londen
4. Cees Street 4 Madrid
But I expect this list
ID Name Adress City
2 John Street 2 Amsterdam
3. Joyce Street 3 Londen
4. Cees Street 4 Madrid
1 Andre Street 1 New York
What am I doing wrong or am I forgotten?
Thanks in advance!!
Andre