In MariaDB, 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 an expression.
Continue readingIn MariaDB, 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 an expression.
Continue readingIf you use SQLcl to query Oracle Database, you might be aware of the SET SQLFORMAT json
option, that makes query results come back as JSON documents.
But there’s also a json-formatted
option, which returns the results in a more human readable format.
SQL Server has a HAS_DBACCESS()
function that returns information about whether the user has access to a specified database.
There are several data dictionary views that we can use to return a list of stored procedures in Oracle Database.
Continue readingIn MariaDB, MIN()
is an aggregate function that returns the minimum value in a given expression.
In MariaDB, MAX()
is an aggregate function that returns the maximum value in a given expression.
In Oracle Database, you can use the fm
(fill mode) format modifier to suppress any leading zeroes that might be applied to a date. This format modifier suppresses padding, which includes leading zeros and trailing blanks.
To use the fm
format modifier, include it in your format model when specifying how dates should be formatted. For example when using the TO_CHAR()
function to format dates, or in NLS parameters such as the NLS_DATE_FORMAT
parameter when setting the date format for your current session.
Below are two options for returning a list of functions in MariaDB.
Continue readingHere are four options for showing all views within an SQLite database.
Continue readingSome RDBMSs like MySQL and MariaDB have a GROUP_CONCAT()
function that allows you to return a query column as a delimited list (for example, a comma separated list).
PostgreSQL has a similar function called STRING_AGG()
. This function works in pretty much the same way that GROUP_CONCAT()
works in MySQL and MariaDB.