Solved

Lookup Fields in SQL Server Management Studio

Posted on 2011-03-24
3
515 Views
Last Modified: 2012-05-11
Is there any equivalent in SQL Server Mgmt Studio to the lookup field in MS Access?  With multiple foreign keys to different tables, it would be nice not to have to join tables each time and just be able to see the name assocated to the auto generated ID
0
Comment
Question by:atkinsHOU
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35210470
no, in Mgt Studio this is not possible.
0
 
LVL 15

Accepted Solution

by:
Aaron Shilo earned 250 total points
ID: 35213180
SQL Server does not have the ability to set up a Lookup field like MS Access does. You will have to do this individually in your application.
You can, however, create views that will query the related table structures and show you the actual values corresponding to the keys stored in your table.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 250 total points
ID: 35214659
What you need is to create a cross-reference table that contains all the "multiple foreign keys".  You will find this approach is far superior as it supports indexing on the columns and will therefore produce good performance on large tables.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
GeoClustering  and AOG 25 41
Want an individual results display div 8 39
Upgrading to SQL Server 2015 Express 2 27
Sql server Error message 3 13
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question