Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to add comment on a table in MySQL?

    • 0
    • 1
    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 481
    Comment on it

    Sometimes wee need to add a comment on a table for more readability means to define what is the use of that table.

    We can do this at the time of table creation or by ALTER command after creating the table.

    1. At the time of table creation:

    CREATE TABLE `white_words` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `word` varchar(45) DEFAULT NULL COMMENT ,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Contains list of Whitewords';
    
    1. After creating table:

    ALTER TABLEwhite_words COMMENT = 'Contains list of Whitewords';

    Hope this will help you :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: