Database.Guide

Skip to content

Beginners

  • What is a Database?
  • Database Tutorial

SQL

  • SQL Tutorial
  • SQL Reference
  • SQL Joins Tutorial
  • SQL Transactions Tutorial
  • Basic SQL Queries

Categories

  • Azure SQL Edge (17)
  • Database Concepts (99)
  • Database Tools (72)
  • DBMS (9)
  • DuckDB (153)
  • MariaDB (424)
  • Microsoft Access (17)
  • MongoDB (265)
  • MySQL (602)
  • NoSQL (8)
  • Oracle (301)
  • PostgreSQL (480)
  • Redis (210)
  • SQL (697)
  • SQL Server (1,170)
  • SQLite (299)

Category: PostgreSQL

How EXCEPT Works in PostgreSQL

Posted on February 11, 2022 by Ian

In PostgreSQL, the EXCEPT operator returns rows that are returned by the left input query that aren’t returned by the right input query. This can also be referred to as the difference between two queries.

Continue reading →
PostgreSQL operators, what is

3 Ways to List All Stored Procedures that Reference a Table in PostgreSQL

Posted on February 8, 2022July 21, 2023 by Ian

Here are three examples of returning a list of stored procedures that reference a specific table in PostgreSQL.

Continue reading →
PostgreSQL how to, stored procedures, window functions

3 Ways to List all Triggers for a Given Table in PostgreSQL

Posted on February 7, 2022 by Ian

Here are three options for listing out the triggers for a given table in PostgreSQL.

Continue reading →
PostgreSQL how to, triggers

5 Ways to Select Rows with the Maximum Value for their Group in SQL

Posted on February 4, 2022July 21, 2023 by Ian

Here are five options for using SQL to return only those rows that have the maximum value within their group.

These examples work in most major RDBMSs, including MySQL, MariaDB, Oracle, PostgreSQL, SQLite, and SQL Server.

Continue reading →
MariaDB, MySQL, Oracle, PostgreSQL, SQL, SQL Server, SQLite how to, window functions

3 Ways to Select the Row with the Maximum Value in SQL

Posted on February 2, 2022February 2, 2022 by Ian

Here are three examples that use SQL to find and select the row with the maximum value in a given column.

The examples work in most major RDBMSs, including MySQL, MariaDB, PostgreSQL, SQLite, Oracle, and SQL Server.

Continue reading →
MariaDB, MySQL, Oracle, PostgreSQL, SQL Server, SQLite how to

4 Ways to Select Duplicate Rows in PostgreSQL

Posted on February 2, 2022July 23, 2023 by Ian

If you have a table with duplicate rows in PostgreSQL, you can use any of the following queries to return the duplicate rows.

Continue reading →
PostgreSQL how to, window functions

Find Values That Don’t Contain Numbers in PostgreSQL

Posted on January 30, 2022 by Ian

The following example returns all rows that don’t contain any numbers in PostgreSQL.

Numbers can be represented by words and other symbols, but for this article “number” simply means “numerical digit”. So we’re finding values that don’t contain any numerical digits.

Continue reading →
PostgreSQL how to

4 Ways to Find Rows that Contain Uppercase Characters in PostgreSQL

Posted on January 29, 2022 by Ian

Here are four options for returning rows that contain uppercase letters in PostgreSQL.

Continue reading →
PostgreSQL how to

How to List All Views in a PostgreSQL Database

Posted on January 28, 2022February 20, 2022 by Ian

In PostgreSQL, we can use the information_schema.views view to return all views in a database.

We can also use the \dv psql command to do the same thing.

Continue reading →
PostgreSQL how to, views

How to Get Multiple Rows into a Comma Separated List in SQL

Posted on January 26, 2022 by Ian

Most of the major RDBMSs have a function that enables us to return our query results as a comma separated list.

That is, we can use such a function to convert each row into a separate list item, within a comma separated list.

Below are examples of how to achieve this in some of the more popular RDBMSs.

Continue reading →
MariaDB, MySQL, Oracle, PostgreSQL, SQL, SQL Server, SQLite aggregation, how to
  • «
  • 1
  • …
  • 29
  • 30
  • 31
  • 32
  • 33
  • …
  • 48
  • »

About Database.Guide | Privacy Policy