Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a Unique Multiple column (from multiple tables) Index

Status
Not open for further replies.

peterv12

Technical User
Dec 31, 2008
108
US
I have a small database with 2 tables. One is mybooks, one is myauthor. What I want to do is create a unique multiple column index from columns in each table. What I'd like is essentially this:

Code:
From books table:  Title
From authors table: Name

New Unique Index: Title+Name

Where the New Unique Index is on the Books Table.

I've seen some examples, but none addresses creating the index from columns on different tables. I need to know if this can be done, and if so how? I have existing tables, so I'd like to be able to do it with ALTER TABLE commands if possible.

Any ideas would be greatly appreciated!
Peter V.
 
Hi Peter V,

From the information that you have stated. I cannot give you an answer.

You mention 2 tables, mybooks and myauthor, but what are the fields in these 2 tables and how are the 2 table connected ?

Also do you want to create a new field in the mybooks table to hold you new unique index or do you already have an index field?

If you supply that information then I might be able to give you a solution.

#
###
#####
#######
Ziggurat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top