79592024

Date: 2025-04-25 07:39:21
Score: 1
Natty:
Report link

In OceanBase MySQL mode, the NOW() and CURRENT_TIMESTAMP functions return time with microsecond precision (up to 6 decimal places).

If your OceanBase instance is running in Oracle mode, functions like SYSTIMESTAMP and CURRENT_TIMESTAMP can return time with nanosecond precision (up to 9 decimal places).

If you need nanosecond-level timestamps in MySQL mode, you can generate them using external applications — for example, with System.nanoTime() in Java or time.Now().UnixNano() in Go — and store them in the database as BIGINT or a custom-formatted string.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Peng Wang