SQL Selects on subsets
- by Adam
I need to check if a row exists in a database; however, I am trying to find the way to do this that offers the best performance. This is best summarised with an example.
Let's assume I have the following table:
dbo.Person(
FirstName varchar(50),
LastName varchar(50),
Company varchar(50)
)
Assume this table has millions of rows, however ONLY the…