0

I'm developing an app using database in iPhone. So I studied a little to use database.

Today, I made a table and executed below code.

CREATE NONCLUSTERED INDEX idxRegionNum on City ( RegionNum );

And I got a syntax error. I explored internet, I thought that NONCLUSTERED syntax doesn't exist in SQLite.

But I need to use NONCLUSTERED INDEX. So I tried to make some indexes, and they were made.

I studied that clustered index can exist only one a table.

In SQLite, does 'create index idxRegionNum on City ( RegionNum )' make nonclustered index?

Thank you for your reading.

MonsterK
  • 565
  • 1
  • 6
  • 12

1 Answers1

1

By default, SQLite indexes are non-clustered.

The only exception that I know of is when you’re using an INTEGER PRIMARY KEY field in your table; that will use the table’s internal row index as primary key.

See this post for a bit more info.

Martijn
  • 13,225
  • 3
  • 48
  • 58