1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Add Unique - MySQL Command


Definition: When you are altering a table to add in another colum you can use Add Unique. This will add in a new column, and make sure that it's not a duplicate of any of the already existing columns. It is written as: alter table your_table add unique (column_name)
Also Known As: Add Unique Column
alter table people add unique (eye_color)
This code would add a new column, eye_color, to the table called people - if that column didn't already exist.
Related Video
Add Sound to PowerPoint
  1. About.com
  2. Technology
  3. PHP / MySQL
  4. MySQL Commands
  5. How to Add a Unique Table Column in MySQL

©2014 About.com. All rights reserved.