Quantcast

Index list

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Index list

Rob van der sloot
I want to use the index of a specific column of a table as a pulldown list
in my application.
But I can't find any syntax how to select or view an index.

Thanks
Rob van der Sloot

--


This email and any attachments to it may be confidential and are intended
solely for the use of the individual to whom it is addressed. Any views or
opinions expressed are solely those of the author and do not necessarily
represent those of the sender of this email.

If you are not the intended recipient of this email, you must neither take
any action based upon its contents, nor copy or show it to anyone.

Please contact the sender if you believe you have received this email in
error.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Index list

Simon Slavin-3

On 11 Feb 2017, at 2:50pm, Rob van der sloot <[hidden email]> wrote:

> I want to use the index of a specific column of a table as a pulldown list
> in my application.
> But I can't find any syntax how to select or view an index.

Sorry.  There is no way to find the contents of an index.

However, you can do SELECT on the column which was indexed using an ORDER BY clause.  And SQLite will automatically use the index to do the SELECT in the fastest way.  (Unless there are two of them !)

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Index list

Niall O'Reilly
In reply to this post by Rob van der sloot
On 11 Feb 2017, at 14:50, Rob van der sloot wrote:

> I want to use the index of a specific column of a table as a pulldown list
> in my application.

  Wouldn't

  SELECT DISTINCT column FROM table;

  give you the same effect?

  I expect the query planner would use the table or not according to its
  estimate of the benefit of doing so.


  Best regards,
  Niall O'Reilly
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Index list

Dominique Devienne
In reply to this post by Simon Slavin-3
On Sat, Feb 11, 2017 at 3:54 PM Simon Slavin <[hidden email]> wrote:

> On 11 Feb 2017, at 2:50pm, Rob van der sloot <[hidden email]>
> wrote:
> > I want to use the index of a specific column of a table as a pulldown
> list
> > But I can't find any syntax how to select or view an index.
>
> Sorry.  There is no way to find the contents of an index.


> [DD] There is. See http://www.sqlite.org/imposter.html

ALthough like others have said just select from the table

In such a way to use the covering index.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...