-
show tables;
-
List existing tables:
mysql> show tables;
+-------------------+
| Tables_in_user_id |
+-------------------+
| booklist |
| books |
| www_index |
+-------------------+
3 rows in set (0.04 sec)
-
desc table;
-
Check table properties:
mysql> desc books;
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| title | char(128) | YES | | NULL | |
| ISBN | char(20) | NO | PRI | NULL | |
| price | double | YES | | NULL | |
+-------+-----------+------+-----+---------+-------+
3 rows in set (0.04 sec)
-
commit;
-
Commit:
mysql> commit;
Query OK, 0 rows affected (0.03 sec)
-
exit;
-
Exit MySQL text monitor:
mysql> exit;
Bye