views:

45

answers:

1

Hi, how can I see the length of a table (in bytes) on SQL Anywhere? It's possible?

Thank you

+3  A: 

To find the number of bytes taken up by the data in a table:

select db_property('pagesize')*(stab.table_page_count+stab.ext_page_count)
    from sys.systab stab join sys.sysuser suser on stab.creator=suser.user_id
    where stab.table_name='table_name' and suser.user_name='user_name'

This does not include the size of any indexes or triggers on the table.

Graeme Perrow
Thank you, that was exactly what I wanted.
Cesar