Skip to content

AWS bytes

  • Cheat Sheets
  • Concepts
    • Show All
    • S3 Concepts
  • How-To Guides
    • Show all
    • EC2
    • EBS
    • S3
    • Redshift
    • IAM
    • SQS
    • CloudWatch
    • Billing
  • CLI Guides
  • Contact Us
  • Tutorials
  • Interview Questions
  • Postgresql

Category: Redshift

How-To Guides / Redshift

How to Change owner of all tables in a Schema in Redshift database

Check the current owner of the tables using the below query where schema_name is the name of the schema in

Continue reading
How-To Guides / Redshift

How to move table from one schema to another in Redshift

Below are the steps to move table from one schema to another in Redshift database. Step 1: Create table in

Continue reading
How-To Guides / Redshift

How to drop a column from a table in Redshift database

Below is the syntax to drop a column from a table in Redshift database where tablename is the name of

Continue reading
How-To Guides / Redshift

How to list all external Schemas in Redshift database

svv_external_schemas system catalog view provides list of all external schemas in your Redshift database. SELECT * FROM svv_external_schemas;

Continue reading
How-To Guides / Redshift

How to connect to redshift database from Command Line using psql

Step1: Download and install psql tool from https://www.postgresql.org/download/ for your version of OS. For Linux: sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

Continue reading
How-To Guides / Redshift

How to get the ddl of an external table in Redshift database

Run the below query to obtain the ddl of an external table in Redshift database. If the view v_generate_external_tbl_ddl is not

Continue reading
How-To Guides / Redshift

How to get the ddl of a table in Redshift database

Run the below query to obtain the ddl of a table in Redshift database. select * from admin.v_generate_tbl_ddl where schemaname

Continue reading
How-To Guides / Redshift

How to list Materialized views, enable auto refresh, check if stale in Redshift database

Run the below query to lit all the materialized views in a schema in Redshift database. select name from STV_MV_INFO

Continue reading
How-To Guides / Redshift

How to list all tables and views in Redshift

Run the below query to return all tables and views of a schema in Redshift database where schemaname is the

Continue reading
How-To Guides / Redshift

How to get the name of the database in Redshift

Run the below query to return the name of the database you are currently connected to. select current_database();

Continue reading

Posts pagination

«Previous Posts 1 2 3 4 5 6 … 11 Next Posts»
  • PostgreSQL Tutorials
  • Redshift Tutorials
WordPress Theme: Maxwell by ThemeZee.