Skip to content

Instantly share code, notes, and snippets.

@NorikDavtian
Created January 15, 2022 12:25
Show Gist options
  • Save NorikDavtian/473d6db93dc4b35d8158194a389a0070 to your computer and use it in GitHub Desktop.
Save NorikDavtian/473d6db93dc4b35d8158194a389a0070 to your computer and use it in GitHub Desktop.

UID generation from EPOCH

SELECT UNIX_TIMESTAMP() * 1e3 + 1;
+--------------------------+
|UNIX_TIMESTAMP() * 1e3 + 1|
+--------------------------+
|1642249326001             |
+--------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment