Thursday, March 22, 2012

Check if Table is empty

Hi,
I would like to do a check in a SP if a table is empty.
How do i do that?
Thanksif exists(select * from <your table>)
select 'not empty'
else
select 'empty'|||Originally posted by Paul Young
if exists(select * from <your table>)
select 'not empty'
else
select 'empty'

Great..
Thaks

No comments:

Post a Comment