Dennis Cote wrote:
>Then you should add an index on the Name column and use that to process
>your queries in Name order more quickly.
>create index on MyTable(Name);
Thanks a lot Dennis. My process is more fast by means indexing.
Dennis Cote wrote:
>If you really insist on reordering your table
Dennis Cote wrote:
>Then you should add an index on the Name column and use that to process
>your queries in Name order more quickly.
>create index on MyTable(Name);
Thanks a lot Dennis. My process is more fast by means indexing.
Dennis Cote wrote:
>If you really insist on reordering your tab
Mahalakshmi.m wrote:
>
> I wish to perform all operations in my code with sorted order of the Name
> field.
>
Then you should add an index on the Name column and use that to process
your queries in Name order more quickly.
create index on MyTable(Name);
If you really insist on reordering your
1)
SELECT rowid,Id,Name FROM MyTable ORDER BY Name;
Rowid Id Name
4 4 aaa
3 3 bbb
2 2 xxx
1 1 zzz
2)
"create table Temp as select Name from Mytable order by Name;"
RowidId Name
1 4
>
>But I need my rowid to be chaged as follows.
>
>Rowid Id Name
>1 4 aaa
>2 3 bbb
>3 2 xxx
>4 1 zzz
You can't.
Rowid isn't an index of where the row appeared in the results, it's a
'hidden' field in each row in the table.
Why do you need your rowid to be changed?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mahalakshmi.m
Sent: Friday, March 14, 2008 1:03 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] Rowid After Sorting
Hi,
I am working in 3.3.6 and my table looks
The rowid is the b-tree key for the row. You cannot change it.
Mahalakshmi.m wrote:
> Hi,
>
> I am working in 3.3.6 and my table looks like.
>
>
>
> Id - Integer Primary Key
>
> Name- Text
>
>
>
> Id Name
>
> 1 zzz
>
> 2
> But I need my rowid to be chaged as follows.
>
>
>
> Rowid Id Name
>
>
>
> 1 4 aaa
>
> 2 3 bbb
>
> 3 2 xxx
>
> 4 1 zzz
If you are looking Rowid to contain serial numbers every time then you can
query for only Id
Hi,
I am working in 3.3.6 and my table looks like.
Id - Integer Primary Key
Name- Text
Id Name
1 zzz
2 xxx
3 bbb
4 aaa
SELECT rowid,Id,Name FROM MyTable ORDER BY
9 matches
Mail list logo