Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    india
    Posts
    67

    Unanswered: get table names & number of rows

    I have 100 tables say t1,t2,t3 ...

    I want to write a query to get the following output(Name,count(*))

    t1 1
    t2 34
    t3 241

    etc..

    Please help me , I am new to sysbase.

    Thanks

  2. #2
    Join Date
    Feb 2012
    Location
    Pune
    Posts
    11

    get table names & number of rows

    Hi you can use below query ,but remember stats of all table should be updated . then only it gives correct count

    select a.name,b.rowcnt from sysobjects a,systabstats b
    where a.id=b.id
    and b.indid=0
    and name like "t%"

Posting Permissions

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