SQL

Incompatibilities.

SQL

Written by VR Saturday, 02 April 2011 19:21

  • The standard and DB2 have different sets of reserved words.
  • Authorization identifiers are limited to a maximum of 8 characters in DB2.
  • String literals are varying length in DB2 but fixed length in the standard.
  • In DB2, updates against a view V are checked against the check option specified for V and also against the check option specified for each view W on which V is defined. In other words the check option is inheritable in DB2.This is not the case with the standard.
  • The DB2 concept that there is an implicit WHENEVER statement for each condition-NOT FOUND,SQLERROR also SQLWARNING at the start of the program text, specifying  CONTINUE in each case is not supported in the standard.
  • The standard does not explicitly permit the possible that an error on retrieval might generates a null and set the indicator variable to -2.Whether it forbids it is unclear.
  • The COMMIT and ROLLBACK statements are illegal in DB2 under IMS  batch,IMS/DC.
  • The standard requires all concurrent executions if interleaved transactions to be serializable.DB2 cannot provide such a guarantee if any of the transactions in question executes under CS isolation level.
 

Db2 Features Not Supported In The Standard.

SQL

Written by VR Saturday, 02 April 2011 19:20

The standard does not allow any characters to appear in identifiers other than the uppercase letters A-Z the digits 0-9 and the underscore character.DB2 allows the character #,@,and $ to appear in an identifier  wherever a letter can appear.DB2 also allow double byte characters to appear in identifiers and supports “delimited  identifiers”.

  • DB2 allows consecutive underscore characters to appear in an identifier.The standard does not.
  • The DB2 concept of system-defined default values does not exist in the standard ;the specification NOT NULL WITH DEFAULT on CREATE TABLE is a DB2 extension.
  • DB2 allows a value of appropriate numeric type to be assigned to an object of exact numeric type. The standard does not.
  • DB2 support hexadecimal literals.
  • DB2 supports a concatenate operator.
  • The standard does not include any scalar built-in functions.
  • DB2  support the use of explicitly defined range variable in UPDATE and DELETE as well as in SELECT.
  • The standard does not support the COMMENT or LABEL statements.
  • The standard does not support synonyms.
  • The standard does not support aliases.
  • The standard does not support the statement SET CURRENT SQLID,SET CURRENT PACKAGESET,SET host variable and CONNECT.

Standard Features Not Supported In DB2.

SQL

Written by VR Saturday, 02 April 2011 19:18

The only aspects of SQL/89 not supported by DB2 are certain element of the Integrity Enhancement Feature, IEF.To be Specific:

  • IEF supports user-defined default values.DB2 does not.
  • IEF supports CHECK constraints on base tables (and column thereof).DB2 does not.
  • If a primary key is single-column.IEF permits that primary key to be defined by means of a PRIMARY KEY specification within that column’s individual column definition.DB2 requires all primary keys to be defined by means of a separate PRIMARY KEY clause.
  • The IEF REFERENCES specification(as part of an individual column definition) is not supported in DB2;FOREIGN KEY clause supported in DB2 only by means of a separate FOREIGN KEY clause.
  • IEF permits a foreign key to reference any candidate key;DB2 requires a foreign key to reference a primary key specifically.
  • DB2 does not support the REFERENCES privilege(it uses the ALTER privilege for the purpose instead).
 

SqlFlag.

SQL

Written by VR Saturday, 02 April 2011 19:17

The purpose of the SQL FLAG option is to request the Precompiled to flag any SQL statements that deviate from the rules for whichever standard is specified in the option. The possible specifications are SAA and 86.If 86 is specified it will flag deviations from SQL/86 and hence more significantly from FIPS 127-1 we say “more significantly” because one of the requirements of FIPS 127-1 is that the implementation “shall provide an option to flag nonconforming SQL language”.

STDSQL.

SQL

Written by VR Saturday, 02 April 2011 19:13

  • SQL  style comments are permitted.
  • Explicit BEGIN DECLARE SECTION and END DECLARE SECTION statements are required.
  • The program must not contain a declaration for the SQLCA.Instead  it must contain an explicit SQL CODE declaration(and that declaration must not be part of a structure nor factored in with other declarations).
  • If the argument to an aggregate function such as SUM includes DISTINCT and the function reference in turn appears as an operand in a larger arithmetic expression as in (e.g) the expression SUM (DISTINCT X) +3 the overall expression is accepted but a warning message is produced.
 

Page 1 of 29

«StartPrev12345678910NextEnd»

Login Form (Can use your Gmail Acct)

Latest Comments

Copyright © 2017 Interview Questions, Tutorials, Certification Questions. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.