Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

How do I retrieve the most recent used autonumber?? - response (4) by ulrich

$
0
0
Teradata is a MPP system, so data is distributed and processed in parallel. So this is implemented differently- In easy words: To become not sequencial the identity process is done Vproc specific and each vproc is requesting a number range. So you will not get a closed number range if you insert data to a table. Something like 1. insert creates ID 1001 2. insert creates ID 2001 3. insert creates ID 2002 4. insert creates ID 1 5. insert creates ID 1002 so not a single system variable can hold the latest id or you would break the parallelism. Check also the manuals and there exists a lot of posts here or in www.teradataforum.com Do you do bulk inserts or sequential? Consider to do the id generation with SQL and maintain a last_id in a generic reference table      

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>