The "Filed BY record name" statement indicates that the named file should be utilized to look into values on the first table.
On the off chance that list name doesn't exist or can't be utilized for the question, at that point the arrangement of the SQLite explanation fizzles.
The "NOT INDEXED" proviso determines that no file will be utilized while getting to the first table, including suggested files made by UNIQUE and PRIMARY KEY requirements.
Notwithstanding, the INTEGER PRIMARY KEY can in any case be utilized to look into sections in any event, when "NOT INDEXED" is indicated.
Syntax
Following is the language structure for INDEXED BY provision and it very well may be utilized with DELETE, UPDATE or SELECT articulation.
SELECT|DELETE|UPDATE column1, column2...
INDEXED BY (index_name)
table_name
WHERE (CONDITION);
Example
Consider table COMPANY We will make a file and use it for performing INDEXED BY activity.
sqlite> CREATE INDEX salary_index ON COMPANY(salary);
sqlite>
Presently choosing the information from table COMPANY you can utilize INDEXED BY statement as follows −
sqlite> SELECT * FROM COMPANY INDEXED BY salary_index WHERE salary > 5000;
This will deliver the accompanying outcome.
ID NAME AGE ADDRESS SALARY
---------- ---------- ---------- ---------- ----------
7 James 24 Houston 10000.0
2 Allen 25 Texas 15000.0
1 Paul 32 California 20000.0
3 Teddy 23 Norway 20000.0
6 Kim 22 South-Hall 45000.0
4 Mark 25 Rich-Mond 65000.0
5 David 27 Texas 85000.0
