PostgreSQL provides us with several ways to get the day, month, and year from a date.
Three functions that immediately come to mind are; DATE_PART(), EXTRACT(), and TO_CHAR().
PostgreSQL provides us with several ways to get the day, month, and year from a date.
Three functions that immediately come to mind are; DATE_PART(), EXTRACT(), and TO_CHAR().
When using SQLcl with Oracle Database, you can export your query results to an XML file with the SPOOL command.
Here’s an example of formatting a number as currency in MariaDB.
Some DBMSs provide us with the ability to format a number as a currency by providing a format specifier for the currency symbol. Providing such a format specifier allows the DBMS to return the appropriate currency symbol for the locale.
MySQL doesn’t have a currency format specifier, and so we need to do a bit of extra work if we want the currency symbol to be returned.
In MySQL, you can use the DATE_FORMAT() function with the %b format specifier to return the short month name. For example, you can return Jan or Feb instead of January or February.
Microsoft Azure SQL Edge’s backup capabilities are similar to those in SQL Server on Linux, and SQL Server running in containers.
Azure SQL Edge supports T-SQL, and so you can back up your SQL Edge databases by running a T-SQL statement.
In this article, I back up a SQL Edge database to the local disk in my Docker container.
The following two functions enable us to get the month name from a date in MySQL.