MySQL Programming Question:

Download Job Interview Questions and Answers PDF

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

MySQL Programming Interview Question
MySQL Programming Interview Question

Answers:

Answer #1
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.

Answer #2
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)

Download MySQL Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How Many SQL DML Commands Are Supported by "mysql"?How To Get Help Information from the Server?