Help and Show Commands in MySQL


In MySQL we have to use many commands.  Some commands use to show statement.

These commands provide general information related to our database.  The output from show table contains a single column of table names.  This statement also lists any views in the database.
Such as follows in given commands in the given figures :

mysql> use db_name;
mysql> show databases;
mysql> show databases like 'ba%' ;

img-1.gif

Show Statement :Show Tables lists the non-TEMPORARY tables in a given database.

mysql> show tables;

img-2.gif

Describe : This command shows table f
unctionality.

mysql> describe table_name;
mysql> select user(), now(), version(), database();

img-3.gif

mysql> show tables from db_name like '__ab%'
mysql> show columns from products;
mysql> show grants for root@localhost;

img-4.gif

mysql> show index from products;
mysql> show index from products from mcn;
mysql show processlist;

img-5.gif

Status :
Get status information from the server.

mysql> show status ;

img-6.gif

 mysql> show table status from mcn;

img-7.gif

Variables : Show variables shows the values of MySQL system variables. Show variable displays the values that are used for new connections to MySQL.

mysql> show variables;

img-8.gif

Up Next
    Ebook Download
    View all
    Learn
    View all