any idea how to update Id column ,for example i have Id: 1,2,3,6,9 and i want to order again Id: 1,2,3,4,5.
with this put all Id with the last number (logical)
do not control much of sql.
thank you
with this put all Id with the last number (logical)
B4X:
Sub ordenaid
Dim Cursor As Cursor
Dim lon As Int
Cursor=sq.ExecQuery("Select Id from evolucion")
lon=Cursor.RowCount
Dim i As Int
For i=1 To lon
Cursor.Position=i
If i=1 Then
sq.ExecNonQuery("UPDATE evolucion SET Id = ('"&i&"')")
Next
End Sub
thank you