In PostgreSQL, the AVG() function computes the average (arithmetic mean) of all the non-null input values, and returns the result.
what is
PostgreSQL DESCRIBE TABLE Equivalent
Some DBMSs such as Oracle, MySQL, and MariaDB have a DESCRIBE command that returns information about tables and views. It goes DESCRIBE table where table is the name of the table or view, and it can also be followed by a column name if you only want information about a specific column.
PostgreSQL doesn’t have a DESCRIBE TABLE command as such, but there are alternatives.
SUM() Function in SQL Server
In SQL Server, the SUM() aggregate function returns the sum of a given expression.
It can also be used to return the sum of all distinct (unique) values in the expression.
SUM() only works on numeric columns. Null values are ignored.
How TRY_CONVERT() Works in SQL Server
In SQL Server, the TRY_CONVERT() function is very similar to the CONVERT() function, except that TRY_CONVERT() doesn’t return an error if the conversion fails (CONVERT() does).
Instead, the TRY_CONVERT() function returns NULL if the conversion doesn’t succeed.
There are some occasions however, where TRY_CONVERT() will return an error.
CONVERT() in SQL Server
In SQL Server, the CONVERT() function converts an expression of one data type to another.
Here’s a quick overview of the function with examples.
How CAST() Works in SQL Server
In SQL Server, the CAST() function converts an expression of one data type to another.
Here’s a quick overview of the function with examples.
MAX() Function in PostgreSQL
In PostgreSQL, the MAX() function computes the maximum of the non-null input values and returns the result.
This function can be used on any numeric, string, date/time, or enum type, as well as inet, interval, money, oid, pg_lsn, tid, and arrays of any of these types.
MIN() Function in PostgreSQL
In PostgreSQL, the MIN() function computes the minimum of the non-null input values and returns the result.
This function can be used on any numeric, string, date/time, or enum type, as well as inet, interval, money, oid, pg_lsn, tid, and arrays of any of these types.
DATABASE() – Get the Current Database Name in MySQL
In MySQL, DATABASE() is a built-in function that returns the default (current) database name.
The result is returned as a string in the utf8 character set. If there is no default database, it returns NULL.
PRAGMA table_list in SQLite
In SQLite, the table_list pragma returns information about the tables and views in the schema.
It was first introduced in SQLite version 3.37.0 (released on 2021-11-27).