Updating the SQL key value



In an application I am writing the user can define a series of steps to be followed. I save them in a sql database using the field "order" (a smallint) as the primary key.
(there are in the range of 20 steps)

On the admin page the steps are listed, in "order" order and the user can create new steps and assign an order and all is well.

The problem may come in using a renumber function which should take the steps in their current order and reassign the "order" key, assigning each set an "order" that is the prior "order" + 10.

In other databases I have worked with this is a major pain because as soon as you save a record the order may change.
OTOH, in mysql it appears that if you do a select for the whole table you have them all in memory and can change the value of the field "order" without having to worry about getting that record again and then save the whole table.

Is that correct ?

bill
.



Relevant Pages

  • Re: Database Independance
    ... > writing a Delphi application and where you desire database independance ... > with SQL database. ...
    (borland.public.delphi.non-technical)
  • temporary store values?
    ... these are to be written to an SQL database. ... I intend to use a while loop and read in these postings of four variables ... the values and writing in everything at the same time. ... passing of the loop new values will be assigned to each variable) ...
    (comp.lang.php)
  • Error: data truncated.
    ... When writing a text to a SQL database nvarcharfield, ... String or binary data would be truncated. ... How can I make that at least the first 6 characters will be saved and the ...
    (microsoft.public.dotnet.framework.adonet)
  • SQL Licensing
    ... I have some programmers that are writing a custom Time/Attendance/Time ... data collected from this program will be stored in an SQL database. ... the server app connect to the database and the client app connect via ...
    (microsoft.public.sqlserver.clients)
  • Re: test sql connection
    ... Ales Baranek wrote: ... how to test ms sql database is ready to write data before writing? ... How are you writing data? ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)