If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > command in create table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-15-11, 11:46
georgipa georgipa is online now
Registered User
 
Join Date: Dec 2002
Location: Madrid - Spain
Posts: 283
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.
Reply With Quote
  #2 (permalink)  
Old 04-15-11, 12:03
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On