This is the syntax of a select statement as shown in the manual:
SELECT [ALL | DISTINCT] result [FROM table-list]
[WHERE expr]
[GROUP BY expr-list]
[HAVING expr]
[compound-op select]*
[ORDER BY sort-expr-list]
[LIMIT integer [( OFFSET | , ) integer]]
The bit you want is LIMIT[integer]. Say LIMIT 1 and you'll get one record
of the found set.
Mike
On 25/01/2008 13:45:32, arbalest06 ([EMAIL PROTECTED]) wrote:
Good day!
I want to retrieve only one record in the database with a condition that
may
cause a retrieval of many records. The purpose of this is for me to check
only if there is at least 1 record in the database. So if given my
condition, the query would now search for one record in the database that
satisfies the condition the returns that record. After one record is
found,
it should now stop finding and retrieving other records that satisfies
the
condition. How can i do this? What query can i issue?
Thank you and God bless!
--
View this message in context: http://www.nabble.com/Retrieving-only-one-
record-in-the-database-tp15087994p15087994.html
Sent from the SQLite mailing list archive at Nabble.com.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------