<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – ALTER TABLE</title>
    <link>/en/sql-reference/statements/alter-statements/alter-table/</link>
    <description>Recent content in ALTER TABLE on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/statements/alter-statements/alter-table/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: Projection column encoding</title>
      <link>/en/sql-reference/statements/alter-statements/alter-table/projection-column-encoding/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/alter-statements/alter-table/projection-column-encoding/</guid>
      <description>
        
        
        &lt;p&gt;After you create a table and its projections, you can call &lt;a href=&#34;../../../../../en/sql-reference/statements/alter-statements/alter-table/&#34;&gt;ALTER TABLE...ALTER COLUMN&lt;/a&gt; to set or change the &lt;a href=&#34;../../../../../en/sql-reference/statements/create-statements/create-projection/encoding-types/&#34;&gt;encoding type&lt;/a&gt; of an existing column in one or more projections. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ALTER TABLE store.store_dimension ALTER COLUMN store_region
  ENCODING rle PROJECTIONS (store.store_dimension_p1_b0, store.store_dimension_p2);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In this example, the ALTER TABLE statement specifies to set RLE encoding on column &lt;code&gt;store_region&lt;/code&gt; for two projections: &lt;code&gt;store_dimension_p1_b0&lt;/code&gt; and &lt;code&gt;store_dimension_p2&lt;/code&gt;. The &lt;code&gt;PROJECTIONS&lt;/code&gt; list references the two projections by their projection name and base name, respectively. You can reference a projection either way; in both cases, the change is propagated to all buddies of the projection and stored in its DDL accordingly:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; select export_objects(&amp;#39;&amp;#39;,&amp;#39;store.store_dimension&amp;#39;);

                          export_objects
------------------------------------------------------------------
CREATE TABLE store.store_dimension
(
    store_key int NOT NULL,
    store_name varchar(64),
    store_number int,
    store_address varchar(256),
    store_city varchar(64),
    store_state char(2),
    store_region varchar(64)
);

CREATE PROJECTION store.store_dimension_p1
(
 store_key,
 store_name,
 store_number,
 store_address,
 store_city,
 store_state,
 store_region ENCODING RLE
)
AS
 SELECT store_dimension.store_key,
        store_dimension.store_name,
        store_dimension.store_number,
        store_dimension.store_address,
        store_dimension.store_city,
        store_dimension.store_state,
        store_dimension.store_region
 FROM store.store_dimension
 ORDER BY store_dimension.store_key
SEGMENTED BY hash(store_dimension.store_key) ALL NODES KSAFE 1;

CREATE PROJECTION store.store_dimension_p2
(
 store_key,
 store_name,
 store_number,
 store_address,
 store_city,
 store_state,
 store_region ENCODING RLE
)
AS
 SELECT ...
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
When you add or change a column&#39;s encoding type, it has no immediate effect on existing projection data. OpenText™ Analytics Database applies the encoding only to newly loaded data, and to existing data on &lt;a href=&#34;../../../../../en/admin/managing-db/tuple-mover/mergeout/&#34;&gt;mergeout&lt;/a&gt;.
&lt;/div&gt;

      </description>
    </item>
    
  </channel>
</rss>
