code: public void addCheckKey(final Connection _con,
                              final String _tableName,
                              final String _checkKeyName,
                              final String _condition)
          throws SQLException
      {
          final StringBuilder cmd = new StringBuilder()
                          .append("alter table ").append(_tableName).append(" ")
                          .append("add constraint ").append(_checkKeyName).append(" ")
                          .append("check(").append(_condition).append(")");
  
          AbstractDatabase.LOG.debug("    ..SQL> " + cmd.toString());
          // excecute statement
          final Statement stmt = _con.createStatement();
          try {
              stmt.execute(cmd.toString());
          } finally {
              stmt.close();
          }
      }
docs: Adds a new check key to given SQL table.
  
  @param _con SQL connection
  @param _tableName name of the SQL table for which the check key must be
  created
  @param _checkKeyName name of check key to create
  @param _condition condition of the check key
  @throws SQLException if check key could not be defined for SQL table