Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 16th, 2003, 07:20 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Columns in an Index

What is the advantage of including several columns in an Index, for example:

Code:
CREATE INDEX CustomerIndex
ON Customers (LastName, FirstName)
as opposed to creating 2 indexes, one for each column?

Regards
Owain Williams
__________________
Regards
Owain Williams
 
Old June 16th, 2003, 10:17 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The records will have a sub-sort, i.e. Smith, Andrew, will appear before Smith, Zack
 
Old June 16th, 2003, 12:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also, it allows you to ensure that the combination is unique, even if the individual fields do not have to be.



Brian Skelton
Braxis Computer Services Ltd.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VBA to Sort Multiple Columns meclive Excel VBA 1 July 30th, 2008 11:04 AM
Multiple-key index umeshtheone Pro VB 6 3 October 30th, 2007 07:50 AM
multiple checkbox columns mariag BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 June 4th, 2007 03:06 PM
Multiple Columns in an Index owain SQL Server 2000 8 June 17th, 2003 03:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.