title: Display message if table is empty
body: <p>I have a table and if data exists I have to display data with dbms_output. If the table is empty I have to write a message &quot;table is empty'.</p>
  <p>I want to use cursors and I don't know how the condition should look like when the table is empty.</p>
  <p>That works fine:</p>
  <pre><code>declare
  cursor cursor_name is select nr, name from branch;
  begin 
      for i in cursor_name
      loop
          dbms_output.put_line('Number: ' || to_char(i.nr) || ' Name: ' || i.name);
      end loop;
  end;
  /
  </code></pre>