系统时间函数
MySQL数据库中获取系统时间的函数有current_timestamp、current_timestamp on update current_timestamp、localtime、sysdate()、locaktimestamp,虚谷数据库中对应的系统时间函数为sysdate。
MySQL
SQL> select current_timestamp as systemtime from dual; SQL> select localtime as systemtimefrom dual; SQL> select sysdate() as systemtimefrom dual; SQL> select localtimestamp as systemtime from dual; systemtime | -------------------+ 2022-07-28 03:14:53|
- Xugu
SQL> select current_timestamp as systemtime from dual; SQL> select sysdate() as systemtime from dual; systemtime | -------------------+ 2022-07-28 03:14:53|