In the early stage, I found some information on the Internet to solve the unique order number problem. Someone suggested using the guid type.
View the description in msdn as follows:
The GUID type indicates a 16-byte (128-bit) guid value. This type is mapped to the uniqueidentifier type in SQL Server.
According to this description, The GUID is stored as the uniqueidentifier type in the database. The GUID value is obtained based on the unique number of computer NICs identified by a CPU clock. The NIC manufacturer can guarantee the uniqueness of the NIC at least within the next month.
Guid generation. The default value is automatically generated in the database:
Create Table [order] (uniquecolumn uniqueidentifier default newid (), characters varchar (10 ))
C # generate the guid value. C # a guid structure and a static method newguid () can be used to create a guid instance. The details are as follows:
Guid. newguid ();