Support between different databases for GUID generation functions

Source: Internet
Author: User
Tags sybase
In ms SQL Server, there is a NEWID function, the returned data type is UniqueIdentifier, length is 36.

Oracle has the SYS_GUID function. The returned data type is char and the length is 32.

In DB2, there is no GUID generation function, there is an alternative function generate_unique, the returned data type is char for bit, the length is 13.

SYBASE also has the NEWID () function. The returned data type is char and the length is 36.

Comment: GUID plays a very important role in ensuring the uniqueness of the Primary Key of data records. DB2 does not support this function, and DB2 is the worst among mainstream commercial databases. Ms SQL Server also has data types that directly support guids, which are best supported. SYBASE is the worst-performing document. The NEWID function cannot be found in its document, but it can be used.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.