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: Postgresql

Postgresql

PostgreSQL – List all databases

Run the below query to view all the databases in Postgres. select oid as db_id, datname as db_name, datallowconn from

Continue reading
Postgresql

PostgreSQL – Add not-null Constraint

Below is the syntax to add the not null constraint to a table column in postgres database ALTER TABLE table_name

Continue reading
Postgresql

PostgreSQL – Generate Explain Plan

You can view the explain plan of any query by prefixing the query with EXPLAIN keyword as shown below: EXPLAIN

Continue reading
Postgresql

PostgreSQL – Create Table

A Table is a database object that holds data. You must specify table name, column names and their data types

Continue reading
Postgresql

PostgreSQL – Create View

A view is a named query stored in the database. A view does not store any data like a table

Continue reading
Postgresql

PostgreSQL – Drop Trigger

Syntax to drop trigger in Postgres database: DROP TRIGGER triggername ON tablename;

Continue reading
Postgresql

PostgreSQL – Rename Table

Below is the syntax to rename a table in Postgres where tablename is the current name of the table and

Continue reading
Postgresql

PostgreSQL – Rename Constraint

Below is the syntax to rename a constraint in Postgres database where table_name is the name of the table and

Continue reading
Postgresql

PostgreSQL – Drop Tablespace

Syntax to drop a tablespace in Postgres: DROP TABLESPACE tablespace_name;

Continue reading
Postgresql

PostgreSQL – Drop Type

You can remove a user defined data type using below syntax: DROP TYPE typename;

Continue reading

Posts pagination

«Previous Posts 1 … 4 5 6 7 8 … 10 Next Posts»
  • PostgreSQL Tutorials
  • Redshift Tutorials
WordPress Theme: Maxwell by ThemeZee.