Home >> FAQs/Tutorials >> MySQL Tutorials

MySQL Tutorial - Non-Standard SQL Commands

By: FYIcenter.com

(Continued from previous topic...)

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

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)

(Continued on next topic...)

  1. What Is the Command Line End User Interface - mysql?
  2. What Are the "mysql" Command Line Options?
  3. What Are the "mysql" Command Line Arguments?
  4. How Many SQL DDL Commands Are Supported by "mysql"?
  5. How Many SQL DML Commands Are Supported by "mysql"?
  6. What Are the Non-Standard SQL Commands Supported by "mysql"?
  7. How To Get Help Information from the Server?
  8. How To Run "mysql" Commands from a Batch File?
  9. How To Return Query Output in HTML Format?
  10. How To Return Query Output in XML Format?

MySQL Tutorials:

More...


Other Tutorials/FAQs:

More...


Related Resources:

More...


Selected Jobs:

More...