In message <[EMAIL PROTECTED]>
, Gordon Stewart <[EMAIL PROTECTED]> writes
>Sometimes, I want to start from "1" and find the next number / record
>- that is available (this is normal..)
>
>but - what if I want to "temporariliy" start from record  10,000 ??

This sounds like bad design, and it sounds as though you are storing
problems up for yourself in the future.

Depending on your logic, 
EITHER add a field to the table, and have it set to High sequence or Low
Sequence, (I would use 1 and 2)
OR
create another table for the high sequence.  You can always join the
tables if you need a query that shows both.

>If the set command works, & I put
>
>SET insert_id = 10000;
>
>In the next INSERT - will it force the insert command to use record 10,000
>
>Or does it act like an auto-increment number, & insert 10,001  ???

10,000

The *next* insert after that will give you 10,001

I don't like SET insert_id, because you don't specify a table, and if
the code is ever changed, you have to !remember! to keep SET insert_id
with the INSERT that you want.


-- 
Pete Clark

Sunny Andalucia
http://hotcosta.com/Andalucia.Spain

Reply via email to