How Do We Show What Tables Exist?
If we type show tables; into our CLI, we'll get:
mysql> show tables;
+---------------------+
| Tables_in_employees |
+---------------------+
| names |
+---------------------+
1 row in set (0.00 sec)
When working in the MySQL CLI, the output will look like the examples here. Remember to add the semicolon ; after each command or query. This tells MySQL that it can start executing what you've typed.
How do we describe the table to see how it was created and what fields it contains?
mysql> describe names;
+-----------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+-------+
| id | int(10) unsigned | NO | | NULL | |
| lastName | varchar(252) | NO | | NULL | |
| firstName | varchar(252) | NO | | NULL | |
+-----------+------------------+------+-----+---------+-------+
3 rows in set (0.01 sec)