Here are three ways to get the data type of a given column in MariaDB.
Continue readingTag: how to
How to List all Stored Procedures in MariaDB
In 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.
3 Ways to Check Column Data Type in Oracle
Here are three ways to get information about a table’s columns in Oracle, including their data types.
Continue reading4 Ways to Check a Column’s Data Type in MySQL
Here are four ways to get the data type of a column in MySQL.
Continue readingReturn Random Rows from a Table in MariaDB
Here’s a quick way to return random rows from a table in MariaDB.
Continue readingHow to Format Numbers with Commas in SQL
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 reading3 Ways to Get a List of Databases in SQL Server (T-SQL)
Below are three ways we can use T-SQL to return a list of databases in SQL Server.
Continue readingDROP TABLE IF EXISTS in MariaDB
In MariaDB, we can use the IF EXISTS
clause of the DROP TABLE
statement to check whether the table exists or not before dropping it.
3 Ways to List all Stored Procedures in a PostgreSQL Database
Here are three options for listing out all the stored procedures in a Postgres database.
Continue readingReturn Query Results as a Comma Separated List in Oracle
In Oracle, we can use the LISTAGG()
function to convert our query results to a comma separated list.
So, instead of each value being output in a separate row, all values are output in a single row, separated by a comma (or some other delimiter of our choosing).
Continue reading