Non-Standard SQL Commands in MySQL

Q

What Are the Non-Standard SQL Commands Supported by "mysql" in MySQL?

✍: FYIcenter.com

A

There are many non-standard SQL commands that are supported by "mysql". Here is short list of some commonly used commands:

  • "SHOW infoName" - Shows basic information of based on the specified information name.
  • "SHOW infoName" - Shows basic information of based on the specified information name.
  • "SET ..." - Sets new values to server or connection session variables.
  • "GRANT ..." - Grants access privileges to users.
  • "REVOKE ..." - Revokes access privileges from users.
  • "CHECK TABLE tableName" - Checks the specified table for errors.
  • "ANALYZE TABLE tableName" - Analyzes the specified table.
  • "REPAIR TABLE tableName" - Repairs the specified table.
  • "BACKUP TABLE tableName" - Backs up the specified table.
  • "RESTORE TABLE tableName" - Restores the specified table.
  • "USE databaseName" - Uses the specified database as the current database.
  • "HELP topicName" - Returns help information on the specified topic.

Here is a tutorial exercise of how to use SHOW, USE and ANALYZE commands in "mysql":

>cd \mysql\bin
>mysql -u root

mysql> USE test;
Database changed

mysql> SHOW TABLES;
+----------------+
| Tables_in_test |
+----------------+
| articles       |
| links          |
+----------------+
2 rows in set (0.00 sec)

mysql> ANALYZE TABLE links;
+----------+-------+--------+---------------------------+
|Table     |Op     |Msg_type|Msg_text                   |
+----------+-------+--------+---------------------------+
|test.links|analyze|status  |Table is already up to date|
+----------+-------+--------+---------------------------+
1 row in set (0.14 sec)

 

Command-Line End User Interface 'mysql'

⇒⇒MySQL Database Tutorials

2016-10-17, 229👍, 0💬