Check table comments from INFORMATION_SCHEMA.TABLES : Comment « Command MySQL « SQL / MySQL





Check table comments from INFORMATION_SCHEMA.TABLES

        
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   'Sum of the penalty in Euro''s')
    ->    COMMENT = 'Penalties that have been paid by the tennis club'
    -> ;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT   TABLE_NAME, TABLE_COMMENT
    -> FROM     INFORMATION_SCHEMA.TABLES
    -> WHERE    TABLE_NAME = 'PENALTIES';
+------------+--------------------------------------------------+
| TABLE_NAME | TABLE_COMMENT                                    |
+------------+--------------------------------------------------+
| penalties  | Penalties that have been paid by the tennis club |
+------------+--------------------------------------------------+
1 row in set (0.00 sec)

mysql>
mysql> drop table penalties;
Query OK, 0 rows affected (0.00 sec)

mysql>

   
    
    
    
    
    
    
    
  










Related examples in the same category

1.Comments in MySQL
2.Comments in SQL Statements