I have been working with SQL Server (2005, 2008R2 & 2012) for about six years now and have recently decided that I should start down the path of earning certifications. Part of what is available to me at work is a CBT Nuggets license, which has been wonderful, and I am currently using the Self Test feature, also great. I have been going through the flash cards focusing on the areas I need work on and I have a question I am a bit stumped with.
The actual question along with their answer is below. My question is: Why is "a stored procedure" the object type that fits the description? A stored procedure can do many things, but filtering on a primary key of a table is very rarely the main application for them. Also, why wouldn't "a view" be a possible answer? I can define a view and filter on the tables primary key, would that not be correct? Am I missing something here? Maybe I'm just not thinking about it from the right angle....
What object type is used to return certain columns from a table based on the primary key column of that table?
A stored procedure
Thanks for your help,