Category: RedShift

Redshift Blog Archives, by Peter Whyte (Database Administrator). Includes Redshift Administration blog posts and SQL Scripts.

  • Why Use WHERE 1=2 in SQL

    In a previous blog post, I explained why WHERE 1=1 is often used in SQL queries. This time, let’s discuss WHERE 1=2 — or any condition that results in a FALSE value, such as WHERE 1=9. Essentially, the point is to use a condition that is guaranteed to…

    Read More


  • Redshift JDBC Driver Download

    Need to download the Redshift JDBC client driver? Here’s how you can do it quickly:> From the AWS Redshift Console: Navigate to the Configure tab and download the JDBC driver.> Download From AWS Docs: Download the JDBC driver directly from the AWS Documentation. I’m sharing this quick guide…

    Read More


  • List all Tables & Columns in Redshift or Postgres

    If you need to list all tables and columns in Redshift or Postgres, this guide provides a SQL script to retrieve schema details across all databases. Redshift is based on (forked from) PostgreSQL, meaning many core SQL commands work similarly in both. However, Redshift introduces key differences, such…

    Read More


  • Creating a New User in Redshift and Promoting to Superuser

    This article provides a step-by-step demo for creating a new User in Redshift and promoting it to a Superuser. I’ll include useful tips, best practices, and links to AWS Docs to help streamline the process. In Amazon Redshift, a Superuser has the highest level of permissions, equivalent to…

    Read More


  • Drop Users in RedShift

    Dropping users in Amazon Redshift is a simple task, but sometimes you may encounter an error message if the user you are trying to drop is an owner of an object in the database, such as a schema, table, or view. When this happens, you will see one…

    Read More


  • Create a Test AWS RedShift Cluster

    Here’s a simple guide on creating a new AWS RedShift Cluster within a personal AWS test environment. Warning, if you’re testing this AWS Service you have to be rigorous with managing the cluster for billing reasons. I delete my cluster right after I’m done with it as you’ll…

    Read More


  • Why use WHERE 1=1 in SQL Queries

    A common SQL question is, why would anyone use WHERE 1=1 in their queries? And what does it do? The WHERE 1=1 condition means WHERE TRUE. It returns the same query result as it would without the WHERE Clause. There is no impact on query execution time. This…

    Read More