程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SyBase數據庫 >> SyBase綜合文章 >> SYBASE 數據庫遷移到AS 400 db2的FAQ(三)

SYBASE 數據庫遷移到AS 400 db2的FAQ(三)

編輯:SyBase綜合文章
繼續上一篇文章的內容

21.Db2中SQLSTATE的代號如何定義?

答:如下

Class Code 00: UnqualifIEd Successful Completion

Class Code 01: Warning

Class Code 02: No Data

Class Code 07: Dynamic SQL Error

Class Code 08: Connection Exception

Class Code 09: Triggered Action Exception

Class Code 0A: Feature Not Supported

Class Code 0E: Invalid Schema Name List Specification

Class Code 0F: Invalid Token

Class Code 0K: Resignal When Handler Not Active

Class Code 20: Case Not Found for Case Statement

Class Code 21: Cardinality Violation

Class Code 22: Data Exception

Class Code 23: Constraint Violation

Class Code 24: Invalid Cursor State

Class Code 25: Invalid Transaction State

Class Code 26: Invalid SQL Statement IdentifIEr

Class Code 27: Triggered Data Change Violation

Class Code 28: Invalid Authorization Specification

Class Code 2D: Invalid Transaction Termination

Class Code 2E: Invalid Connection Name

Class Code 2F: SQL Function Exception

Class Code 34: Invalid Cursor Name

Class Code 38: External Function Exception

Class Code 39: External Function Call Exception

Class Code 3B: Savepoint Exception

Class Code 3C: Ambiguous Cursor Name

Class Code 42: Syntax Error or Access Rule Violation

Class Code 44: WITH CHECK OPTION Violation

Class Code 46: Java Errors

Class Code 51: Invalid Application State

Class Code 54: SQL or Product Limit Exceeded

Class Code 55: Object Not in Prerequisite State

Class Code 56: Miscellaneous SQL or Product Error

Class Code 57: Resource Not Available or Operator Intervention

Class Code 58: System Error

22.如何對當前游標的行數據進行刪除,更新操作?

答:例如 DECLARE THISEMP CURSOR FOR SELECT EMPNO, LASTNAME,
WORKDEPT, JOB
FROM CORPDATA.EMPLOYEE
FOR UPDATE OF JOB ;

open THISEMP ;



UPDATE CORPDATA.EMPLOYEE
SET JOB = :NEW-CODE
WHERE
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved