Skip to content
  • Praveenkumar Hulakund's avatar
    6b8dcc1a
    WL#12798 - Implement ALTER TABLE ... DROP/ALTER CONSTRAINT syntax. · 6b8dcc1a
    Praveenkumar Hulakund authored
    This WL focuses to provide SQL standard syntaxes to DROP or ALTER
    constraint.
    
    Following changes are done as part of this WL:
    
    A Syntax Changes:
    
      The ALTER TABLE statement is extended in a following way to support
      new clauses,
    
      A.1 For DROP CONSTRAINT clause:
            alter_specification:
              ...
              DROP CONSTRAINT symbol;
    
            Example:
              ALTER TABLE t1 DROP CONSTRAINT `primary`;
    
      A.2 For ALTER CONSTRAINT clause:
            alter_specification:
              ...
              ALTER CONSTRAINT symbol [NOT] ENFORCED;
    
            Example:
              ALTER TABLE t1 ALTER CONSTRAINT t1_chk_1 ENFORCED;
    
          WL supports SQL standard syntax at this point. Support to alter
          constraints of type other than CHECK constraint is out of this
          WL scope. Error is reported if constraint of type other than
          CHECK is used with ALTER CONSTRAINT clause.
    
    B The type of constraints in DROP CONSTRAINT / ALTER CONSTRAINT
      clauses are identified by the "name" in prepare stage of the alter
      table operation.
      Constraints of different types can have the same name because of
      separate namespaces. Such ambiguous situation are handled by reporting
      an error, forcing user to use constraint specific DROP or ALTER
      clause.
    
    C Test cases are added to the constraints.test of main suite.
    
    Change-Id: I96ba54f110fff21520ff0e48fcc8c7dea9dc962a
    6b8dcc1a
    WL#12798 - Implement ALTER TABLE ... DROP/ALTER CONSTRAINT syntax.
    Praveenkumar Hulakund authored
    This WL focuses to provide SQL standard syntaxes to DROP or ALTER
    constraint.
    
    Following changes are done as part of this WL:
    
    A Syntax Changes:
    
      The ALTER TABLE statement is extended in a following way to support
      new clauses,
    
      A.1 For DROP CONSTRAINT clause:
            alter_specification:
              ...
              DROP CONSTRAINT symbol;
    
            Example:
              ALTER TABLE t1 DROP CONSTRAINT `primary`;
    
      A.2 For ALTER CONSTRAINT clause:
            alter_specification:
              ...
              ALTER CONSTRAINT symbol [NOT] ENFORCED;
    
            Example:
              ALTER TABLE t1 ALTER CONSTRAINT t1_chk_1 ENFORCED;
    
          WL supports SQL standard syntax at this point. Support to alter
          constraints of type other than CHECK constraint is out of this
          WL scope. Error is reported if constraint of type other than
          CHECK is used with ALTER CONSTRAINT clause.
    
    B The type of constraints in DROP CONSTRAINT / ALTER CONSTRAINT
      clauses are identified by the "name" in prepare stage of the alter
      table operation.
      Constraints of different types can have the same name because of
      separate namespaces. Such ambiguous situation are handled by reporting
      an error, forcing user to use constraint specific DROP or ALTER
      clause.
    
    C Test cases are added to the constraints.test of main suite.
    
    Change-Id: I96ba54f110fff21520ff0e48fcc8c7dea9dc962a
Loading