Below are four ways to list out the views in a MySQL database using SQL or the command line.
MySQL
Find a String within a String in SQL
Most of the major DBMSs provide us with a way to find a string within a string using SQL. By this, I mean use a SQL query to find the position of a substring within a string.
There are several SQL functions that allow us to do this, including INSTR(), LOCATE(), POSITION(), and CHARINDEX(). The function you use will depend on your DBMS, and possibly whether or not you need to specify a starting position.
How to Check if a Table Already Exists Before Creating it in MySQL
In MySQL, you can use the IF NOT EXISTS clause of the CREATE TABLE statement to check whether or not a table of the same name already exists in the database.
If the table doesn’t exist, it will be created. If it already exists, it won’t be created.
5 Ways to Check if a Table Exists in MySQL
Here are five ways to check whether or not a table exists in a MySQL database.
2 Ways to List all Stored Procedures in MySQL
Below are two options for returning a full list of stored procedures in MySQL.
JSON_VALUE() in MySQL
In MySQL, the JSON_VALUE() function extracts a value from a JSON document at the specified path.
The function was introduced in MySQL 8.0.21.
GROUP_CONCAT() Function in MySQL
MySQL has a GROUP_CONCAT() function that enables us to return columns from a query as a delimited list.
It returns a string result with the concatenated non-NULL values from a group.