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.
Continue readingDatabase Management Systems
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.
Continue readingBelow is a list containing the SQL Server data types, in order of precedence.
Continue readingIn MariaDB, we can use the SHOW PROCEDURE STATUS
command to return a list of stored procedures.
We can also query the information_schema.routines
table to do the same thing.
Here are three ways to get information about a table’s columns in Oracle, including their data types.
Continue readingHere are four ways to get the data type of a column in MySQL.
Continue readingHere’s a quick way to return random rows from a table in MariaDB.
Continue readingIn 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.
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.
Most of the major RDBMSs have functions that enable us to format numbers with commas as either the group separator, or the decimal separator.
Some RDBMSs also output certain numeric data types with commas in the relevant place.
Below are examples of formatting numbers with commas in some of the more popular DBMSs.
Continue readingIn 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
.