On 3/9/18, Hegde, Deepakakumar (D.) wrote:
>
> SELECT * FROM NEWFOLDER WHERE ID IN (3,1,2);
>
Here is a query that gives the rows in the order you desire:
WITH a(x,y) AS (VALUES(3,1),(1,2),(2,3))
SELECT newfolder.* FROM newfolder, a WHERE x=id ORDER BY y;
--
D.
If the prefered ORDER BY clause is awkward;
How large is your table?
and is it on a Solid State Disk (SSD) with low seek time?
If the table is small (less than 100,000 rows) and you are querying by an
indexed field (such as the Primary Key)
you could just do three (or N) SELECT statements to
On 3/9/18, Hegde, Deepakakumar (D.) wrote:
>
> So for us expected output is:
If your query does not have an ORDER BY clause, then SQLite (and every
other SQL database engine) is free to return the result rows in any
order it wants.
At this point in history, SQLite
On 2018/03/09 3:14 PM, Hegde, Deepakakumar (D.) wrote:
Hi All,
We have a problem as below:
we have created a table as below:
CREATE TABLE NEWFOLDER(ID INTEGER PRIMARY KEY, NAME TEXT NOT NULL) ;
We have inserted 5 entry to this table, and ID will be from 1 to 5 as below
ID NAME
1
to get the entry from sqlite db without primary
>key or rowid order?
>
>Hi All,
>
>
>We have a problem as below:
>
>
>we have created a table as below:
>
>CREATE TABLE NEWFOLDER(ID INTEGER PRIMARY KEY, NAME TEXT NOT NULL) ;
>
>We have inserted 5 entry to this
st
Subject: [External] Re: [sqlite] How to get the entry from sqlite db without
primary key or rowid order?
This Message originated outside your organization.
Don’t think there is a FIELD function in sqlite Andy (MySQL has one).
with cte(ID) as (values (3),(1),(2))
select * from cte inner
8 1:30:25 PM
To: 'SQLite mailing list'
Subject: Re: [sqlite] How to get the entry from sqlite db without primary key
or rowid order?
First, you cannot rely on the order of the rows unless you specify it. So it is
"just luck" that they are in ID order.
To get want you want you must specify an or
rg
Subject: [External] [sqlite] How to get the entry from sqlite db without
primary key or rowid order?
This Message originated outside your organization.
Hi All,
We have a problem as below:
we have created a table as below:
CREATE TABLE NEWFOLDER(ID INTEGER PRIMARY KEY, NAME TEXT NOT NULL)
Hi All,
We have a problem as below:
we have created a table as below:
CREATE TABLE NEWFOLDER(ID INTEGER PRIMARY KEY, NAME TEXT NOT NULL) ;
We have inserted 5 entry to this table, and ID will be from 1 to 5 as below
ID NAME
1 ABC
2 AAA
3 CBA
4 BAC
5 BBB
We execute
9 matches
Mail list logo