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 – Change owner of all tables within a schema

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

Continue reading
Postgresql

PostgreSQL – Move table from one schema to another

Below command can be used to move table from one schema to another in Postgres database. ALTER TABLE table_name SET

Continue reading
Postgresql

PostgreSQL – Change user password

Below is the syntax to change a user’s password in postgres database. ALTER USER username PASSWORD ‘newpassword’; You can also

Continue reading
Postgresql

PostgreSQL – Concatenate values

Concatenation of values can be done either by using the concatenation operator || or the CONCAT function. Below is the

Continue reading
Postgresql

PostgreSQL – COALESCE function

In Postgres database, COALESCE returns the first non-null value in the list of expressions passed to the function. It returns

Continue reading
Postgresql

PostgreSQL – Add columns to an existing table

Below is the syntax to add a new column to an existing table in Postgres database. ALTER TABLE table_name ADD

Continue reading
Postgresql

PostgreSQL – Drop not-null Constraint

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

Continue reading
Postgresql

PostgreSQL – Create Table AS using a query

CREATE TABLE AS can be used to create a new table from the results of a query. Syntax: CREATE TABLE

Continue reading
Postgresql

PostgreSQL – Dropping a Schema

Below is the syntax to drop a schema in postgres database. DROP SCHEMA schemaname; Above statement will fail if the

Continue reading
Postgresql

PostgreSQL – Create Schema

A schema is a namespace for a collection of database objects. Below is the syntax to create a schema in

Continue reading

Posts pagination

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