O'Reilly logo

Getting Started with Amazon Redshift by Stefan Bauer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with tables

Keeping in mind the location of the data and servers, temporary tables are a powerful tool that can work with intermediate result sets. There are a few options for temporary tables. They can be created either with a traditional create statement, with an into statement, or with a create table as (CTAS) syntax. However, do keep in mind that the create table as syntax, regardless of whether it is temporary or permanent, will not carry forward your column-compression encoding. You can use any create table statement syntax that normally applies to tables, and by adding the TEMP or TEMPORARY keyword in the statement, the table will reside in a temporary schema.

Note

Both of these statements will create a table with the same columns ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required