On Mon, Feb 13, 2012 at 03:48:24PM +0000, Simon Slavin scratched on the wall:
> 
> On 13 Feb 2012, at 1:02pm, Igor Tandetnik wrote:
> 
> > bhaskarReddy <uni...@gmail.com> wrote:
> >>       How to check whether a table is empty or not. If a table is empty, i
> >> want to do some logic. If not another logic.
> > 
> > select exists (select 1 from MyTable);

> SELECT COUNT(*) from MyTable

  For a large table, that might take some time.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to