I would like to return all the tables and their counter next to it. What is the fastest way to do this?
I know in Oracle, you can do something like below, but not sure about Sybase:
declare n number; begin for rec in (select object_name from user_objects where object_type='TABLE') loop execute immediate 'select count(*) from '||rec.object_name into n; dbms_output.put_line (rec.object_name||':'||n); end loop; end;
source share