title: DB2 create table and insert in tablespace
body: <p>my DBA created three different tablespaces in DB2 in order to store the same table (TABLE_IN_TBS), switching on a date field. </p>
  
  <pre><code>CREATE LARGE TABLESPACE "TBS_x" IN DATABASE PARTITION GROUP NODO0 PAGESIZE 32768 MANAGED BY DATABASE
       USING (FILE 'x.LRG' 1G) ON DBPARTITIONNUMS (0)
       EXTENTSIZE 32
       PREFETCHSIZE AUTOMATIC
       BUFFERPOOL BP32K0
       OVERHEAD 12.670000
       TRANSFERRATE 0.180000
       AUTORESIZE YES
       MAXSIZE 30 G
       NO FILE SYSTEM CACHING
       DROPPED TABLE RECOVERY ON;
  </code></pre>
  
  <p>Then I have TBS_x in which data in predefined range will be add, TBS_x+1 for the next range and so on..</p>
  
  <p>My question is: I have to create the same table TABLE_IN_TBS in the different tablespaces? With the following syntax?</p>
  
  <pre><code>    CREATE TABLE TABLE_IN_TBS
    (
    SomeColumns....
    ) TABLESPACE TBS_x;
  </code></pre>
  
  <p>And in which way I can refer to different tablespaces in order to insert data in the right tablespace based on my date field to switch?</p>