How to create the required DB2 table name (1)

Source: Internet
Author: User
Tags db2 create table

When creating a table name in a DB2 database, it may contain various types of characters according to your needs. This article describes how to use different characters when creating a table name for your reference.

Environment:
Product: DB2 UDB
Platform: cross-platform
Version: v8

Problem description:

In DB2 UDB, unless otherwise specified, all names can contain the following characters:

· A to Z. When used in most names, characters A to Z are converted from the write form to the uppercase form.
· 0 to 9
· @, #, $, And _ underlines)
· The name cannot start with a number or underline.

The naming of a table as a database object follows the same rules. Therefore, even if the table name used during table creation is in lower case, DB2 automatically converts the table to upper case, for example:

Db2 create table testname (a1 int)
The DB20000I SQL command is successfully completed.

Db2 list tables

Table/view mode type creation time
-----------------------------------------------------------------------------
:
Testname testuser t 2005-09-24-18.15.30.428001
:

What should I do if the table name I want to create contains lower-case characters? Here we will briefly introduce how to create and use it.


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.