Re: [sqlite] How to check whether a table is empty or not in sqlite.

2012-02-13 Thread Igor Tandetnik
On 2/13/2012 11:20 AM, Kit wrote: 2012/2/13 Igor Tandetnik: bhaskarReddy 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

Re: [sqlite] How to check whether a table is empty or not in sqlite.

2012-02-13 Thread Kit
2012/2/13 Igor Tandetnik : > bhaskarReddy 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 exists(SELECT 1 FROM MyTable

Re: [sqlite] How to check whether a table is empty or not in sqlite.

2012-02-13 Thread Jay A. Kreibich
On Mon, Feb 13, 2012 at 03:48:24PM +, Simon Slavin scratched on the wall: > > On 13 Feb 2012, at 1:02pm, Igor Tandetnik wrote: > > > bhaskarReddy wrote: > >> How to check whether a table is empty or not. If a table is empty, i > >> want to do some logic. If not

Re: [sqlite] How to check whether a table is empty or not in sqlite.

2012-02-13 Thread Simon Slavin
On 13 Feb 2012, at 1:02pm, Igor Tandetnik wrote: > bhaskarReddy 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); Or SELECT COUNT(*) from MyTable

Re: [sqlite] How to check whether a table is empty or not in sqlite.

2012-02-13 Thread Igor Tandetnik
bhaskarReddy 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); -- Igor Tandetnik ___ sqlite-users mailing list

[sqlite] How to check whether a table is empty or not in sqlite.

2012-02-13 Thread bhaskarReddy
HI Friends, 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. Can any one tell me how to check if table in a data base is empty or not, using sqlite3. Regards, Bhaskar. -- View this message in context: