By using this SHOW COLLATION query statement, we will get the list of collations supported by the MySQL server. In MySQL, a Collation is a set of procedures for relating letterings in a character set. We run the below code:Įxample #5 – Using SHOW COLLATION Command To find a matching character set from the database, we can apply an option such as a LIKE clause to specify a certain pattern expression to produce the matched results. We use the following MySQL statement for this: We can check all the present character sets available on the MySQL server. Suppose we have a sample table named ‘Books’ in a database.Įxample #4 – Using SHOW CHARACTER SET Command This MySQL command is used to query the list of table columns found in a specific table in a particular database. If we further want to fetch the result of tables specifying a specific name, like suppose starting or ending with particular letters, then we use the query here: The below SHOW command shows if the existing table is a base or view table in the result fetched. For this, when we log in to the MySQL server or phpMyAdmin then, we need to select a particular database to list out the tables available there using the following query: We will apply this command to query and retrieve tables from a specific database on the server. If we want to fetch the information of databases by applying a particular pattern, we should use the LIKE clause in the previous query. We can also use the SHOW SCHEMAS command, which also results in the same value as the above output. This MySQL command is responsible for displaying all the databases present on the server using the following statement: Example #1 – Using SHOW DATABASES Command Let us view some examples regarding the MySQL SHOW commands to understand the functionality better. In this way, the MySQL SHOW commands work on the MySQL database server to perform different activities responsible for other tasks. We can also look up the privileges using the SHOW PRIVILEGES command, supported on that MySQL server version. TO view the server status, we can apply the SHOW STATUS command.įor some critical conditions, SHOW commands in MySQL provide a SHOW ERRORS query to show any errors, warnings, or notes on the server. Even we can implement a MySQL LIKE clause along with the SHOW DATABASES that indicates the list of those databases which match a specific pattern type. Also, we can use SHOW SCHEMAS as a synonym for SHOW DATABASES, etc. You can find a simple basic syntax to denote the SHOW commands in MySQL, like: SHOW DATABASES SHOW ERRORS SHOW TABLES SHOW COLUMNS FROM TableName SHOW PROCESSLIST SHOW EVENTS SHOW TABLE STATUS SHOW PRIVILEGES SHOW WARNINGS SHOW CREATE VIEW SHOW VARIABLES SHOW ENGINE SHOW INDEX SHOW GRANTS SHOW STATUS SHOW PLUGINS SHOW CREATE FUNCTION How does SHOW Command Work in MySQL?įurther, the MySQL SHOW Commands like SHOW CREATE VIEW query allow the display of the create view MySQL statement SHOW DATABASES query helps list all the databases on the MySQL server. The MySQL SHOW commands permit showing off the structure, fields, indexes, and functions created or stored procedures of the MySQL server, which may be necessary to view for the users at a time. Hadoop, Data Science, Statistics & others
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |