chetana bhargav <[EMAIL PROTECTED]> wrote: > Actually I am trying to retrieve values in a single step. > > My queries need to be something like, > > select count(*) from tbl1 where state='Normal'; > select count(*) from tbl1 where state='Critical' > > I got to have these two as seperate, because if there's any critical > need to display a diff icon, and also the sum of those results. So > wondering how can I avoid two table scans, and instead try to > retrieve them in a single statement. >
SELECT count(state='Normal'), count(state='Critical') FROM tbl1; -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------