More MySQL tips for viewing data in a database and listing the columns in a table.

In this example; we are using the old and crusty Northwind database in the latest MySQL database engine. Here I am showing the tables in the database. mysql> show tables in nw_old; +——————+ | Tables_in_nw_old | +——————+ | categories | | customers | | employees | | order_details | | orders | | products | … Read more

How to list the indexes in a MySQL database table.

How to list the indexes in a MySQL database table. Easily done using the show command. mysql> show index from customer; +———-+————+——————-+————–+——————–+———–+————-+———-+——–+——+————+———+—————+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +———-+————+——————-+————–+——————–+———–+————-+———-+——–+——+————+———+—————+ | customer | 0 | … Read more

More MySQL tips. Listing databases and viewing the MySQL version.

How to list tables in a MySQL database. mysql> show tables in acme; +—————-+ | Tables_in_acme | +—————-+ | address | | customer | | discount | | order_header | | order_line | | order_shipment | | payment_terms | | phone | | product | | reseller | | salesman | | shipment | | … Read more