I have a Name table with the columns
NameID
Name
TypeID
With the following SQL
SELECT[NameID]
FROM[Name]
WHERE[TypeID] = @TypeID
AND NameID >= (SELECT MIN([NameID])
FROM [Name]
WHERE [Name]='Billy' AND [TypeID]=@TypeID)
Ive been asked to convert this to an Inner Join without using any nested select but not sure how to.
thanks for your help!
Originally I didn’t think you needed a join at all,
Then again, maybe I do not have the requirements clear. What is the purpose of this query?
I agree with Lukas, I am not sure why the person who is telling you to change this thinks an inner join will be better than your original.