Displaying the structure of a Mini SQL (mSQL) database table is very simple. All you have to do is use the relshow command.
Let's assume that you have a database named contact_mgr that contains a database table named Salespeople. To show the structure of the Salespeople table, just type this command at the Unix command line:
Our sample Salespeople table contains just a few columns, and the output from relshow looks like this:
+-----------------+----------+--------+----------+--------------+
| Field
| Type | Length | Not Null | Unique Index |
+-----------------+----------+--------+----------+--------------+
| snum
| int | 4 |
Y | N/A
|
| first_name | char
| 20 | N
| N/A |
| last_name | char
| 20 | N
| N/A |
| sp_index | index
| N/A | N/A | Y
|
+-----------------+----------+--------+----------+--------------+
Other locations on the Developer's Daily web site
We invite you to visit other free educational resources on our web site: