mssql,mysql,Oracle 数据库中获得UUID字符串

sql server : select replace(newId(),'-','')

oracle :select sys_guid() from dual

 SQL> select sys_guid() from dual;
SYS_GUID()
--------------------------------
74CC7FA2ABF7437D9AC29798ACC3E129 SQL>

mysql :UUID()

  JAVA 中获取UUID

 import java.util.UUID;

 import org.junit.Test;

 public class getUUID {
@Test
public void getUuid(){
UUID u = UUID.randomUUID();
System.out.println(u.toString().replace("-", ""));
}
}
上一篇:性能百万/s:腾讯轻量级全局流控方案详解【转自Wetest】


下一篇:Android编程学习过程中遇到的错误以及解决办法