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
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
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
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
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
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:
6 matches
Mail list logo