Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002
    Location
    Madrid - Spain
    Posts
    422
    Provided Answers: 1

    Unanswered: command in create table

    Hi Colleagues,

    When I create a table if i don't specified la clausule IN. ΏIn what space table is create the
    table?. for exampel.

    create table prueba
    ( a int,
    b chat (10) ) data capture none IN "tbs_dat_4k");

    create table prueba1
    ( a char char(20),
    b int );

    In the second example in what space table is create the table prueba1?

    Thank you for advanced.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    If you read the manual it will tell you the following:

    Code:
    If only one table space is specified, all table parts are stored in this table space. This clause cannot be specified when creating a subtable (SQLSTATE 42613), because the table space is inherited from the root table of the table hierarchy. If this clause is not specified, a table space for the table is determined as follows:
    
    IF table space IBMDEFAULTGROUP (over which the user
      has USE privilege) exists with sufficient page size
        THEN choose it
    ELSE IF a table space (over which the user has USE privilege)
      exists with sufficient page size (see below when
      multiple table spaces qualify)
        THEN choose it
    ELSE return an error (SQLSTATE 42727)
    
    If more than one table space is identified by the ELSE IF condition, choose the table space with the smallest sufficient page size. If more than one table space qualifies, choose the table space in the following order of preference, depending on to whom the USE privilege was granted:
    
       1. The authorization ID
       2. A role to which the authorization ID is granted to
       3. A group to which the authorization ID belongs
       4. A role to which a group the authorization ID belongs is granted to
       5. PUBLIC
       6. A role to which PUBLIC is granted to
    
    If more than one table space still qualifies, the final choice is made by the database manager.
    Table space determination can change if:
    
        * Table spaces are dropped or created
        * USE privileges are granted or revoked
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •