On 5/8/05, Brown, Dave <[EMAIL PROTECTED]> wrote:
> That's not what I want, though. I want to UPDATE the actual values in the
> order_number column so they end up as 1, 2, 3 instead of 1, 3, 4.
>
> So I want the result of a "select * from table order by order_number" to
> give me:
> a, 1
> c, 2
>
On 5/9/05, Brown, Dave <[EMAIL PROTECTED]> wrote:
>
> The question I have is: If a row gets deleted, how do I sequentially reorder
> the remaining
> rows? For example:
>
> Start with this:
> a, 1
> b, 2
> c, 3
> d, 4
>
> now delete the row with 'b':
>
> a, 1
> c, 3
> d, 4
>
> I'm trying to fig
: Dong Xuezhang-A19583 [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 08, 2005 8:24 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] SQL to renumber values in a column?
Hi Dave
If you query the database with order by, the result sequence is the order
you are looking for, so you donot need to updat
.
Xuezhang.
-Original Message-
From: Brown, Dave [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 08, 2005 8:11 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] SQL to renumber values in a column?
I have a table that has two columns:
object_id, order_number
The concept here is like a playlist
I have a table that has two columns:
object_id, order_number
The concept here is like a playlist of object IDs...the order number
specifies what order to play or view the objects.
The question I have is: If a row gets deleted, how do I sequentially reorder
the remaining
rows? For example:
Start
5 matches
Mail list logo