Home > Database > Mysql Tutorial > Oracle和Mysql分别生成sequence序列_MySQL

Oracle和Mysql分别生成sequence序列_MySQL

WBOY
Release: 2016-06-01 13:17:06
Original
857 people have browsed it

有时候在往数据库中插入数据的时候,如果ID值是32位的UUID,
而自己随便写个字符又不合适,这时就要用到函数来产生一个序列值

Oracle:

select sys_guid() from dual;
Copy after login
SELECT REPLACE(UUID(),'-','') FROM DUAL;
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template