Question: select that just detects a matching row
Date: 1996/12/10
Message-ID: <32ADD7A5.F24_at_worldnet.att.net>#1/1
I have many places in my application where the user can enter some search criteria, a date lets say, and then makes a request against a table just to see whether any rows matching the criteria are present. In this part of the application, I'm not interested in actually getting the data from the table, or even how many rows match the criteria, I just want to see if some row in the table matches the criteria. What I'm doing now of course is a "select count(*) from table_name where column name = search_criteria". I don't need the total count, and I've got a performance problem with running this query against the tables. Is there any function that's faster that this that will stop and return a "true" value when it encounters the first row that matches the where clause, instead of scanning through all rows and counting them up, in my case unneccesarily? Any ideas would be appreciated...
Chris Received on Tue Dec 10 1996 - 00:00:00 CET