db2命令查看错误信息

应用程序在连接db2数据库时常会遇到一些报错,如:SQLSTATE=01545,sqlcode:"012"。

db2 "?  sql012"        查看sqlcode语法。

db2 "?  01545"         查看sqlstate语法。

[db2inst1@ ~ 12:24:53]$ db2 "?  sql012"
SQL0012W  Correlation without qualification has occurred for the column
      "".
Explanation:
The named column occurs in a SELECT statement, is not explicitly
qualified, and occurs in a table specified in the FROM clause of an
outer select. Consequently, the reference to the column in the SELECT
statement has been taken to be an outer reference and correlation will
occur.
The statement was processed under the assumption that correlation was
intended.
User response:
Ensure that correlation was intended. It is a good practice to
explicitly qualify intended outer references.
sqlcode: +12
sqlstate: 01545
[db2inst1@ ~ 12:25:09]$ db2 "?  01545"
SQLSTATE 01545: An unqualified column name has been interpreted as a
correlated reference.

你可能感兴趣的:(db2命令查看错误信息)