Home » RDBMS Server » Server Administration » Select only one record from query result?
Select only one record from query result? [message #370893] Thu, 02 March 2000 01:05 Go to next message
kat
Messages: 15
Registered: February 2000
Junior Member
Hi,
let me give an example, let's say I have this select statement:
"Select CustomerName from tblCustomer where LastName ='White'"
It's very possible that the result of this query will give me more than one record. But I can only display one of them. And it doesnt matter which record is displayed as long as I am showing one of the many records that meet the criteria. Can someone tell me how it can be done? Thank you.
Re: Select only one record from query result? [message #370914 is a reply to message #370893] Mon, 06 March 2000 09:42 Go to previous message
Andreas Pollmeier
Messages: 7
Registered: February 2000
Junior Member
Hi!
Try this:
"Select min(CustomerName) from tblCustomer where LastName ='White'"

Andreas
Previous Topic: Which is faster Join or subquery
Next Topic: Re: NOT IN operator - very slow
Goto Forum:
  


Current Time: Thu Mar 28 16:05:55 CDT 2024