1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

MYSQL: How to make a combination of 2 columns unique

MYSQL: How to make a combination of 2 columns unique

Setting up some rules in your MySQL database can save you some programming time. This tip will show you how to make a combination of two columns as unique. Suppose you have a database that records BookTitles and Authors. Just having the Author field unique would not make much sense as every Author can have more than one book. But you also don’t want to have an Author / BookTitle combination entered twice. So here we can make the combination of Author and BookTitle unique.

Execute this MySQL statement to make 2 [...] Continue reading MYSQL: How to make a combination of 2 columns unique

Get Adobe Flash playerPlugin by wpburn.com wordpress themes