Here are two options we can use to add an option to our sql_mode
without wiping all existing options.
SUM() Function in MariaDB
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 readingHow to Prettify JSON Formatted Query Results in SQLcl (Oracle)
If 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.
HAS_DBACCESS() – Discover if a User Can Access a Database in SQL Server
SQL Server has a HAS_DBACCESS()
function that returns information about whether the user has access to a specified database.
How to List All Stored Procedures in Oracle Database
There are several data dictionary views that we can use to return a list of stored procedures in Oracle Database.
Continue readingMIN() Function in MariaDB
In MariaDB, MIN()
is an aggregate function that returns the minimum value in a given expression.
MAX() Function in MariaDB
In MariaDB, MAX()
is an aggregate function that returns the maximum value in a given expression.
How to Remove Leading Zeros From Dates in Oracle
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.
2 Ways to List all Functions in MariaDB
Below are two options for returning a list of functions in MariaDB.
Continue reading4 Ways to List the Views in an SQLite Database
Here are four options for showing all views within an SQLite database.
Continue reading