Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Posts
    46

    Unanswered: 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?
    Thanks

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    Code:
    if exists(select * from <your table>)
      select 'not empty'
    else
      select 'empty'
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Aug 2002
    Posts
    46
    Originally posted by Paul Young
    Code:
    if exists(select * from <your table>)
      select 'not empty'
    else
      select 'empty'
    Great..
    Thaks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •