DB2 error code note

Source: Internet
Author: User
Tags db2 error db2 sql error sql error



Profit Return shopping http://www.bbuy8.com

Shopping rebates are justified, but the rebates are not high.


(1)SQL State: 42831

[Error Code:-542, SQL State: 42831] DB2 SQL Error: SQLCODE =-542, SQLSTATE = 42831, SQLERRMC = BATCH_NO, DRIVER = 3.57.82

Column:

Create table T_USER_IMPORT_BATCH (
BATCH_NO char (15) not null primary key,
STATUS Char (1) not null,
CREATE_TIME char (14) not null,
CREATER varchar (30) not null,
AUDIT_TIME char (14 ),
AUDITER Varchar (30 ),
FILE_NAME Varchar (300) not null,
Apsaradb for MEMO Varchar (500)
)

Change to OK

Create table T_USER_IMPORT_BATCH (
STATUS Char (1) not null,
CREATE_TIME char (14) not null,
CREATER varchar (30) not null,
AUDIT_TIME char (14 ),
AUDITER Varchar (30 ),
FILE_NAME Varchar (300) not null,
Apsaradb for MEMO Varchar (500)
)


Cause of error: columns that can be empty cannot be included as part of the primary key. It indicates that the attribute not null must be added as the primary key.


(2) Error Code:-104, SQL State: 42601

[Error Code:-104, SQL State: 42601] DB2 SQL Error: SQLCODE =-104, SQLSTATE = 42601, SQLERRMC = TABLE; DELETE; JOIN

Example:

Delete table T_USER_IMPORT_DETAIL

Change to the following syntax: OK

Drop table T_USER_IMPORT_DETAIL;

Cause of error: the SQL statement contains invalid characters, that is, Nima syntax error.

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.