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

Submitted by: Administrator
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.
Submitted by: Administrator

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

>cd mysqlin
>mysql -u root

mysql> USE test;
Database changed

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

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

Read Online MySQL Programming Job Interview Questions And Answers