OK, thanks. That gets me started.
>>>The second example shows how to assign a scalar value from a query, similar to what SqlCommand.ExecuteScalar() does in .NET.
>>
>>Oh, so then instead of this:
>>
>>
>>[SELECT [@var1 = CompanyName] FROM Customers WHERE CustomerID = 'ALFKA']
>>
>>
>>it's doing something like this:
>>
>>
>>[SELECT @var1 = [CompanyName FROM Customers WHERE CustomerID = 'ALFKA']]
>>
>>
>>Correct?
>
>Conceptually, yes. Although I don't think the grouping would make a difference to the T-SQL engine in that particular example.
>
>And yes, SELECT does not have to hit a table in SQL. It is the catch-all command.