1) To show databases

show databases;

2)Use "database name"

3) To show tables in db


show tables;

use student;





1) To clear MYSQL COMMAND LINE SCREEN

- Once you get in mysql just press \! CLS and you will clear the screen.

----------------------------

-SHOW DATABASES/ SHOW SCHEMAS

-USE STUDENT

-SHOW TABLES/ SHOW TABLES FROM SYSTEM/SHOW TABLES IN SYSTEM


----------------------------

1) To view/show tables in Database 

a)To show tables in selected Database

SHOW TABLES;

examples:

show students;

---------------


b) If we want to show or list the table name from different databases or database to which you are not connected without switching, MySQL allows us to use the FROM or IN clause followed by the database name. The following statement explains it more clearly:

When we execute the below statements, we will get the same result:

Format:

mysql> SHOW TABLES IN database_name; 

OR

mysql> SHOW TABLES FROM database_name;  

Examples:

  1. mysql> SHOW TABLES FROM mystudentdb;  
  2. OR,
  3. mysql> SHOW TABLES IN mystudentdb;  


----------------

Comments