GUID (Global unique identifier) Globally unique identifier, which is a 16-byte binary value generated by the identity number on the network card (each network card has a unique identification number) and the unique number of the CPU clock.
The format of the GUID is "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", where each x is a hexadecimal number in the range of 0-9 or a-f. Example: 76895313-839e-4e89-bafc-b253bff3173f
No two computers in the world will generate duplicate GUID values. GUIDs are primarily used to assign identifiers that must be unique in a network or system that has multiple nodes, multiple computers, and more than one computer. On the Windows platform, GUIDs are widely used: Registry, class and interface identifiers, databases, even automatically generated machine names, directory names, and so on.
1.SQL Server Database
When you previously developed a SQL Server database that specifies a column type as uniqueidentifier in a table definition, the value of the column is the GUID type.
2. Using T-SQL to produce a GUID
Insert INTO table1 (id,name,...) VALUES (NewID (), ' Zhang San ',...)
3. Create a GUID in C #
GUID guid = Guid.NewGuid ();
Console.writeln (GUID. ToString ());
4. Create UUID in Java
Check the data on the Internet only to know in Java, become a UUID. The creation method is surprisingly simple System.out.println (Java.util.UUID.randomUUID ());
Excerpt from: http://qfqf16.blog.163.com/blog/static/128109527201272610564410/
Database, C #, Java generate unique GUID method