This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A stored mosaic panel sits beside its blank construction folio, source tiles and separate fittings.

PostgreSQL – Definition of a Materialized View

September 27, 2021
Pinal Dave
SQL Tips and Tricks
PostgreSQL

pg_matviews lists each PostgreSQL Materialized View and its reconstructed SELECT definition. A cross-platform customer requested this metadata.

Read More
The beginning of an ordered line of pebbles occupies a separate tray compartment

Retrieve TOP 10 Rows Without Using TOP or LIMIT? – Interview Question of the Week #247

October 20, 2019
Pinal Dave
SQL Interview Questions and Answers
MariaDB, MySQL, PostgreSQL, SQL Server

Question: Retrieve TOP 10 Rows Without Using TOP or LIMIT? We do not want to use TOP or LIMIT as they are actually not an ANSI implementation.

Read More
A woven motif remains intact on a source cloth and a separately framed copy.

PostgreSQL – Storing Unicode Characters is Easy

February 16, 2019
Pinal Dave
SQL Tips and Tricks
PostgreSQL, SQL Function, SQL String, Unicode

PostgreSQL varchar can store Unicode with suitable database and client encodings. My example stores ЯНВАРЬ, the Russian word for January.

Read More
Three seedling cups travel together on one tray toward matching recesses

How to Insert Multiple Rows in a Single SQL Query – Interview Question of the Week #069

May 1, 2016
Pinal Dave
SQL Interview Questions and Answers
MySQL, PostgreSQL, SQL Scripts, SQL Server

Interview question: write one script that inserts multiple rows in a single SQL query and runs unchanged in SQL Server, MySQL and PostgreSQL. Here is my answer.

Read More
Gouache painting: two small islands, one with a slate-blue stone tower and one with a sage-green hut, joined by a narrow wooden footbridge with a basket carrying one vermilion fruit across

Linked Server to PostgreSQL: Set It Up From SQL Server 2025

November 24, 2015
Pinal Dave
SQL Tips and Tricks
Linked Server, PostgreSQL, SQL Connection, SQL Scripts

A linked server to PostgreSQL lets SQL Server read PostgreSQL tables through an ODBC driver. This post tests the PostgreSQL side on PostgreSQL 18.6, runs the SQL Server steps up to the missing driver, and shows the real error messages.

Read More
Gouache painting: an open wooden cupboard holding one glass jar with a lid and a single vermilion mango inside it, every other shelf empty

PostgreSQL Local Variable: DECLARE in a plpgsql Function

July 11, 2015
Pinal Dave
SQL Tips and Tricks
PostgreSQL, SQL Function, SQL Scripts, SQL Variable

A PostgreSQL local variable is declared in the DECLARE section of a plpgsql function or DO block. This post tests a function with two variables, the NULL start value, scope, CONSTANT, STRICT, a name clash error and the psql alternative.

Read More
Two railway tracks of slightly different widths meeting, hands adjusting a carriage's red wheel at the join

Migrating From PostgreSQL to SQL Server: Types and Syntax Differences

August 9, 2014
Pinal Dave
SQL Tips and Tricks
PostgreSQL, SQL Datatype, SQL Migration, SQL Server

Plan migrating from PostgreSQL by checking identity values, Unicode, timestamps, paging, returned rows, collations, and upsert behavior.

Read More
1 2 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com