orcale生成uuid
时间: 2024-06-13 10:10:03 浏览: 128
日常Java后端开发-学习备忘录
以下是在Oracle中生成UUID的两种方法:
1. 使用SYS_GUID()函数生成UUID
```sql
SELECT SYS_GUID() FROM dual;
```
2. 使用DBMS_RANDOM包生成UUID
```sql
SELECT LOWER(TO_CHAR(DBMS_RANDOM.randombytes(16), 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx')) AS UUID FROM dual;
```
阅读全文