Start of change

-628   THE CLAUSES ARE MUTUALLY EXCLUSIVE

Explanation

Mutually exclusive clauses were specified in the SQL statement. In the cases where you alter an object, a clause was specified that conflicts with an existing property of the object.

SELECT statements
  • A select-statement value contains both the update-clause and the FOR FETCH ONLY clause.
CREATE DATABASE statements
  • A CREATE DATABASE statement contains both the AS WORKFILE clause and the AS TEMP clause.
ALTER FUNCTION or CREATE FUNCTION statements
  • An ALTER FUNCTION statement for a function that is defined as secured specified the ADD VERSION clause or the REPLACE clause, but not the SECURED clause. When a function is defined as secured and a new version is added or a version is replaced, the ALTER FUNCTION statement must specify the SECURED clause.
  • A CREATE FUNCTION statement contains both a CAST FROM clause and a SOURCE clause.
  • A CREATE FUNCTION statement contains both a SOURCE clause and a RETURNS TABLE clause.
  • A CREATE FUNCTION statement contains both a SOURCE clause and a clause used to define an external function (such as EXTERNAL, LANGUAGE, or NO SQL).
  • A CREATE FUNCTION statement was specified with a PARAMETER VARCHAR clause. You can specify CREATE FUNCTION with PARAMETER VARCHAR only if LANGUAGE C is also specified.
  • A CREATE FUNCTION or ALTER FUNCTION statement can contain the CAST FROM clause for only external scalar functions.
  • A CREATE FUNCTION or ALTER FUNCTION statement specified SCRATCHPAD. SCRATCHPAD must not be specified when LANGUAGE JAVA or PARAMETER STYLE JAVA is also specified for a function.
  • A CREATE FUNCTION or ALTER FUNCTION statement specified FINAL CALL. FINAL CALL must not be specified when LANGUAGE JAVA or PARAMETER STYLE JAVA is also specified for a function.
  • A CREATE FUNCTION or ALTER FUNCTION statement specified LANGUAGE JAVA, LANGUAGE COMPJAVA, or PARAMETER STYLE JAVA, with DBINFO. DBINFO must not be specified in these cases.
  • A CREATE FUNCTION or ALTER FUNCTION statement specified LANGUAGE JAVA or PARAMETER STYLE JAVA, with RUN OPTIONS. RUN OPTIONS must not be specified in these cases.
  • A CREATE FUNCTION or ALTER FUNCTION statement specified PARAMETER STYLE JAVA, but LANGUAGE JAVA was not specified.
  • A CREATE FUNCTION or ALTER FUNCTION statement specified LANGUAGE JAVA, but did not specify PARAMETER STYLE JAVA.
  • LANGUAGE JAVA is not allowed for table functions.
ALTER INDEX or CREATE INDEX statements
  • UNIQUE or UNIQUE WHERE NOT NULL was specified with PARTITIONED on CREATE INDEX. You cannot specify UNIQUE or UNIQUE WHERE NOT NULL with PARTITIONED on CREATE INDEX unless the index includes all the partitioning columns.
  • A CREATE INDEX statement contains both a GENERATE KEY USING and column specified as ASC, DESC, or RANDOM.
  • A CREATE INDEX statement contains XMLPATTERN and PARTITIONED.
  • A CREATE INDEX or ALTER INDEX statement attempted to specify either CLUSTER, PARTITION BY or both for an XML index or an extended index.
ALTER PROCEDURE or CREATE PROCEDURE statements
  • A CREATE PROCEDURE statement specified either FENCED or EXTERNAL indicating that an external SQL procedure is to be defined, and the statement also included one or more options which are allowed only for native SQL procedures. For example, PACKAGE OWNER can be specified on the CREATE PROCEDURE statement for a native SQL procedure, but it is not allowed for an external SQL procedure.
  • A CREATE PROCEDURE statement was specified with a PARAMETER VARCHAR clause. You can specify CREATE PROCEDURE with PARAMETER VARCHAR only if LANGUAGE C is also specified.
  • A CREATE PROCEDURE or ALTER PROCEDURE statement specified LANGUAGE JAVA or PARAMETER STYLE JAVA, with DBINFO. DBINFO must not be specified in these cases.
  • A CREATE PROCEDURE or ALTER PROCEDURE statement specified PARAMETER STYLE JAVA, but LANGUAGE JAVA was not specified.
  • A CREATE or ALTER PROCEDURE statement specified LANGUAGE JAVA, but did not specify PARAMETER STYLE JAVA.
  • A CREATE PROCEDURE or ALTER PROCEDURE statement specified LANGUAGE JAVA with NO WLM ENVIRONMENT. NO WLM ENVIRONMENT must not be specified when LANGUAGE JAVA is also specified for a procedure.
  • A CREATE PROCEDURE or ALTER PROCEDURE statement attempts to use the NO WLM ENVIRONMENT and PROGRAM TYPE SUB options. When NO WLM ENVIRONMENT is used, then SECURITY must also be used.
  • A CREATE PROCEDURE or ALTER PROCEDURE statement attempts to use both NO WLM ENVIRONMENT and either USER or DEFINER for SECURITY. When NO WLM ENVIRONMENT is used, then SECURITY DB2® must also be used.
  • A CREATE PROCEDURE or ALTER PROCEDURE statement contains both a LANGUAGE REXX clause and either a PARAMETER STYLE DB2SQL or PARAMETER STYLE JAVA clause.
  • A CREATE PROCEDURE or ALTER PROCEDURE statement specified LANGUAGE JAVA or PARAMETER STYLE JAVA, with RUN OPTIONS. RUN OPTIONS must not be specified in these cases.
  • A CREATE PROCEDURE or ALTER PROCEDURE statement contains a DEBUG MODE clause when neither LANGUAGE JAVA or LANGUAGE SQL are in effect for the procedure.
ALTER TABLE or CREATE TABLE statements
Only for ALTER TABLE
  • An ALTER TABLE statement contains both a DROP CONSTRAINT clause and either a DROP FOREIGN KEY, DROP CHECK, DROP PRIMARY KEY, or DROP UNIQUE clause.
  • An ALTER TABLE statement contains both an ALTER COLUMN clause and a VALIDPROC clause.
  • An ALTER TABLE statement contains both an ALTER COLUMN clause and a clause other than the check constraint clause.
  • An ALTER TABLE statement contains either an ADD MATERIALIZED QUERY or DROP MATERIALIZED QUERY clause, and some other clauses.
  • An ALTER TABLE statement contains both an ORGANIZE BY HASH clause and the APPEND option.
  • An ALTER TABLE statement contains an ORGANIZE BY HASH clause, but the table is not in a universal table space. The ORGANIZE BY HASH clause is valid only for tables in a universal table space.
  • An ALTER TABLE statement contains both an ADD COLUMN clause and the LONG VARCHAR (or LONG VARGRAPHIC) syntax for the data type for a system-period temporal table.
  • EXTERNAL NAME was specified on ALTER TABLE for an SQL procedure. You can attempt the same action by issuing a DROP for the procedure and attempt rebuilding it with CREATE PROCEDURE.
  • A RENAME clause was issued with another clause in a single ALTER statement. RENAME cannot be issued with any other clause in a single ALTER statement.
Only for CREATE TABLE
  • A CREATE TABLE statement contains both a DSSIZE clause and EVERY integer G clause.
  • An explicit table space cannot be specified on a CREATE TABLE statement that specifies table space attributes for an implicit table space.
  • None
For both ALTER TABLE and CREATE TABLE
  • An ALTER TABLE or CREATE TABLE statement contains an ORGANIZE BY HASH clause, but the table is defined in a table space that is defined with the MEMBER CLUSTER option.
  • An ALTER TABLE or CREATE TABLE statement contains the VERSIONING clause and the LIKE clause.
  • DATA CAPTURE CHANGES for ALTER TABLE or CREATE TABLE can be specified only for tables in table spaces with the LOGGED logging attribute.
  • PARTITION BY SIZE was specified along with an IN clause that identified a table space that is not defined as a partition-by-growth table space.
  • A column-definition value contains both NOT NULL and DEFAULT NULL clauses.
  • A column-definition value contains both FIELDPROC and DEFAULT clauses.
ALTER TABLESPACE or CREATE TABLESPACE statements
  • A CREATE TABLESPACE or ALTER TABLESPACE statement contains both LOCKPART YES and LOCKSIZE TABLESPACE.
  • A USING VCAT clause was specified on a CREATE TABLESPACE or ALTER TABLESPACE statement for a partition-by-growth table space.
  • A CREATE TABLESPACE or ALTER TABLESPACE statement specified MAXPARTITIONS and LOCKSIZE TABLE.
  • An ALTER TABLESPACE statement contains the SEGSIZE clause with another clause. The SEGSIZE clause cannot be used with any other clause.
  • Start of changeAn ALTER TABLESPACE statement with the ALTER PARTITION clause also contains the DSSIZE clause. The DSSIZE clause cannot be specified for a non-relative partition-by-range table space.End of change
  • An ALTER TABLESPACE statement contains the DROP PENDING CHANGES clause with another clause. The DROP PENDING CHANGES clause cannot be used with any other clause.
  • NOT LOGGED for ALTER TABLESPACE is mutually exclusive with DATA CAPTURE CHANGES, which is an attribute of one or more of the tables in the table space.
  • A CREATE TABLESPACE statement contains both the SEGSIZE and MEMBER CLUSTER clauses without either a MAXPARTITIONS or NUMPARTS clause.
  • A CREATE TABLESPACE statement specified MAXPARTITIONS and NUMPARTS.
  • A CREATE TABLESPACE statement contains both MAXPARTITIONS and PARTITION clauses.
  • A CREATE TABLESPACE or ALTER TABLESPACE statement contains both an ORGANIZE BY HASH clause and the APPEND option.
ALTER TRIGGER or CREATE TRIGGER statements
  • A CREATE TRIGGER statement specifies more than one correlation name for OLD, NEW, OLD_TABLE, or NEW_TABLE. Each of these correlation specifications can appear no more than once in the CREATE TRIGGER statement.
  • The WHEN clause must not be specified for an INSTEAD OF trigger.
  • Start of changeTwo attributes in the ALTER or CREATE TRIGGER statement conflict. CREATE TRIGGER indicates which combinations are valid. For example, according to the table, FOR EACH STATEMENT must not be used for a BEFORE or INSTEAD OF trigger or with the REFERENCING NEW clause.End of change
ALTER TRUSTED CONTEXT statements
  • A TRUSTED CONTEXT definition specified ATTRIBUTE JOBNAME with ATTRIBUTE ADDRESS or SERVAUTH or ENCRYPTION.
DECLARE CURSOR statements
  • A DECLARE CURSOR statement specifies both the WITH RETURN TO CLIENT option and one the following options: WITH RETURN (TO CALLER) or WITHOUT RETURN.
  • If INSENSITIVE or SENSITIVE is specified, then SCROLL must also be specified, either on DECLARE CURSOR or with the ATTRIBUTES clause of the PREPARE statement.
  • If SCROLL is specified, then either INSENSITIVE or SENSITIVE STATIC must also be specified, either on DECLARE CURSOR or with the ATTRIBUTES clause of the PREPARE statement.
DECLARE GLOBAL TEMPORARY TABLE statements
  • The AS (subselect) clause of a DECLARE GLOBAL TEMPORARY TABLE statement contains both an INCLUDING COLUMN DEFAULTS clause and a USING TYPE DEFAULTS clause.
PREPARE statements
  • If INSENSITIVE or SENSITIVE is specified, then SCROLL must also be specified, either on DECLARE CURSOR or with the ATTRIBUTES clause of the PREPARE statement.
  • If SCROLL is specified, then either INSENSITIVE or SENSITIVE STATIC must also be specified, either on DECLARE CURSOR or with the ATTRIBUTES clause of the PREPARE statement.
  • The attribute-string value specified in the ATTRIBUTES clause of the PREPARE statement cannot specify conflicting options.

System action

The statement cannot be processed.

Programmer response

Review the permitted options for the statement that you want to issue, change the options specified in the statement, and reissue the statement.

SQLSTATE

42613

End of change