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

Best way to generate the Sequential numbers : CSUM or IDENTITY columns? - response (5) by dnoeth

$
0
0

Hi Nishant,
any IDENTITY/system-maintained sequence may result in gaps (due to restarts or rollbacks), but in Teradata it's not one sequence it's multiple parallel sequences, thus there are always gaps.
Without gaps is only possible with ROW_NUMBER plus
- a table maintaining the highest used value used in a transaction, in best case in a SP
- or ROW_NUMBER + (SELECT COALESCE(MAX(value),0) FROM tab)
Dieter


Viewing all articles
Browse latest Browse all 27759

Trending Articles



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