What sql statement would be able to get values of a field if the records returned are more than one?
For instance, I know that if only one record is needed to be set in a variable, I could do this:
So @var1 will contain the data.Code:declare @var1 varchar(10) select @var1 = [fieldname] from [tablename] where [conditions]
But how would I do it if I know there will be more than one record returned?




Reply With Quote