Skip to content

Database.Guide

functions

PostgreSQL RANDOM_NORMAL() Function Explained

June 25, 2024May 9, 2024 by Ian

In PostgreSQL we can use the random_normal() function to generate a normally-distributed random number.

A normally-distributed random number is a random variable with a Gaussian distribution. This is said to be normally distributed, and is referred to as a normal deviate.

Read more

Categories PostgreSQL Tags functions, what is

A Quick Overview of ARRAY_AGG() in PostgreSQL

June 25, 2024May 4, 2024 by Ian

PostgreSQL has an aggregate function called array_agg() that allows us to generate an array from the result set of a query.

The function accepts an argument which is used to generate the array. This argument is typically the column that we want to use in order to populate the array.

Read more

Categories PostgreSQL Tags aggregate functions, arrays, functions, what is

An Overview of the GENERATE_SUBSCRIPTS() Function in PostgreSQL

June 25, 2024April 29, 2024 by Ian

PostgreSQL has a generate_subscripts() function that generates a series comprising the valid subscripts of a given array.

We pass the array to the function, along with the dimension that we want to use. We also have the option of returning the series in reverse order.

Read more

Categories PostgreSQL Tags arrays, functions, what is

A Quick Overview of the ARRAY_SHUFFLE() Function in PostgreSQL

June 25, 2024April 27, 2024 by Ian

In PostgreSQL array_shuffle() is a system function that randomly shuffles the first dimension of a given array.

The array_shuffle() function was introduced in PostgreSQL 16, which was released on September 14th 2023.

Read more

Categories PostgreSQL Tags arrays, functions, what is

An Introduction to the ARRAY_SAMPLE() Function in PostgreSQL

June 25, 2024April 24, 2024 by Ian

In PostgreSQL array_sample() is a system function that returns an array of a specified number of items randomly selected from the given array.

The array_sample() function was introduced in PostgreSQL 16, which was released on September 14th 2023.

Read more

Categories PostgreSQL Tags arrays, functions, what is

An Overview of the DATE_SUBTRACT() Function in PostgreSQL

June 25, 2024April 22, 2024 by Ian

PostgreSQL 16 introduced the date_subtract() function that allows us to subtract an interval from a timestamp with time zone.

It computes times of day and daylight-savings adjustments according to the time zone named by the third argument, or the current TimeZone setting if that is omitted.

Read more

Categories PostgreSQL Tags date functions, dates, functions, what is

PostgreSQL DATE_ADD() Function Explained

June 25, 2024April 20, 2024 by Ian

PostgreSQL 16 introduced the date_add() function that allows us to add an interval to a timestamp with time zone.

It computes times of day and daylight-savings adjustments according to the time zone named by the third argument, or the current TimeZone setting if that is omitted.

Read more

Categories PostgreSQL Tags date functions, dates, functions, what is

A Quick Introduction to the GET_BIT() Function in SQL Server

January 23, 2024 by Ian

In SQL Server, we can use the GET_BIT() function to return the bit from the specified location in a value. We pass the value as either an integer or binary expression.

The function accepts two arguments; the expression, and the offset. The function then returns the bit from the given offset in the expression.

Read more

Categories SQL Server Tags functions, mssql, t-sql, what is

Introduction to the BIT_COUNT() Function in SQL Server

January 20, 2024 by Ian

In SQL Server, the BIT_COUNT() function returns the number of bits set to 1 in the given argument, based on the binary equivalent of that argument.

Different values will have a different number of 1s in their binary value. Also, the same value can have a different number of 1s, depending on the data type.

Read more

Categories SQL Server Tags functions, mssql, t-sql, what is

Understanding the SET_BIT() Function in SQL Server

January 17, 2024 by Ian

SQL Server 2022 introduced the SET_BIT() function that sets a bit in an integer or binary value (other than a large object).

The function allows us to specify an offset for which to set a bit to 1 or 0.

Read more

Categories SQL Server Tags functions, mssql, t-sql, what is
Older posts
Newer posts
← Previous Page1 … Page24 Page25 Page26 … Page151 Next →

About | Privacy Policy

© 2026 Database.Guide • All rights reserved