mysql>
mysql> CREATE TABLE PENALTIES
-> (PAYMENTNO INTEGER NOT NULL PRIMARY KEY
-> COMMENT 'Primary key of the table',
-> EmployeeNO INTEGER NOT NULL
-> COMMENT 'Employee who has incurred the penalty',
-> PAYMENT_DATE DATE NOT NULL
-> COMMENT 'Date on which the penalty has been paid',
-> AMOUNT DECIMAL(7,2) NOT NULL
-> COMMENT 'Amount of the penalty in dollars')
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT COLUMN_NAME, COLUMN_COMMENT
-> FROM INFORMATION_SCHEMA.COLUMNS
-> WHERE TABLE_NAME = 'PENALTIES';
+--------------+-----------------------------------------+
| COLUMN_NAME | COLUMN_COMMENT |
+--------------+-----------------------------------------+
| PAYMENTNO | Primary key of the table |
| EmployeeNO | Employee who has incurred the penalty |
| PAYMENT_DATE | Date on which the penalty has been paid |
| AMOUNT | Amount of the penalty in dollars |
+--------------+-----------------------------------------+
4 rows in set (0.00 sec)
mysql>
mysql> drop table penalties;
Query OK, 0 rows affected (0.00 sec)