monotonically_increasing_id
function
Applies to: Databricks SQL Databricks Runtime
Returns monotonically increasing 64-bit integers.
Syntax
monotonically_increasing_id()
Arguments
This function takes no arguments.
Returns
A BIGINT.
The generated ID is guaranteed to be monotonically increasing and unique, but not consecutive.
Examples
> SELECT monotonically_increasing_id();
0
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for