Monday, May 9, 2011

SQL related interview question

How to get the below outputs when executing a select on say employee table(suppose employee table is empty)-

1) No rows found

2) Zero rows found

Any idea??? :)


select * from employee  ---- it will give 1st output

and

select count(*) from employee -- it will give 2nd output

It looks so simple but doesn't click in mind when being interviewed :)

No comments:

Post a Comment