DB2 Development Experience Summary

Source: Internet
Author: User

DB2 database developmentDB2 database development is the most important process in the development of DB2 databases. DB2 database development will make DB2 databases more powerful and more advanced in technology. These are all summarized by DB2 database developers from their work, here we will share with you.

UTF-8:Each character is encoded in 1 to 4 bytes. This encoding scheme can encode ASCII characters in one byte, and encode non-ASCII characters in multiple bytes (up to 4 bytes.

UCS-2:Each Unicode character is encoded in 2 bytes. This encoding scheme can represent more than 65000 characters, which covers the majority of Characters in the world's most important language. UCS-2 is also used internally in Java.

Gbk:Double Byte encoding.

Generally, a Chinese character is represented by three bytes in the utf8-encoded database, and two bytes are required in the gbk-encoded database.

Sequence

There are two ways to generate a digital SEQUENCE: defining columns and SEQUENCE with the IDENTITY attribute

Create

Create sequence orders_seq
AS BIGINT
Start with 1
Increment by 1
MINVALUE 1
NO MAXVALUE
NO CYCLE
NO CACHE
ORDER


Query

Select nextval FOR orders_seq from sysibm. sysdummy1

Change

Alter sequence orders_seq restart with 100000.

Delete

Drop sequence orders_seq RESTRICT
 

The above is a summary of some experiences in DB2 database development. I hope this will help you.

Related Article

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: info-contact@alibabacloud.com 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.