It selects every row where field1=xxx.
If you just want the first one then you need to apply a sort sequence to
the query and then use the Top N option.
Such as :
SELECT TOP 1 OrderID, UnitPrice, ProductID
FROM [Order Details]
WHERE ProductID=11
ORDER BY OrderID DESC;
Regards
Peter Russell
Daniel Tan previously wrote:
Does SQL select sql = "select * from table 1 where field1=xxx " just
select a row that matched the criteria or select every record in the
table with that criteria ? Pls advise. Thanks
Regards,
Daniel