title: How to get exact Sybase DB size in a integer or varchar
body: <p>I am trying to retrieve the DB size of my sybase DB.But everywhere I got this command to see DB size, "<strong>sp_spaceused</strong>".But this command is showing all the information along with DB size.
  Below is the output,</p>
  
  <pre><code>1&gt; sp_spaceused
  2&gt; go
  database_name database_size
  ------------- -------------
  mydb         310.0 MB
  
  (1 row affected)
  reserved data    index_size unused
  -------- ------- ---------- -------
  5690 KB  1036 KB 2986 KB    1482 KB
  (return status = 0)
  </code></pre>
  
  <p>Here mydb is the database name what I am using.But I want a sybase query or command what will return only the DB size which I can place in a varchar or integer and use through out my .sql DB script.</p>
  
  <p>or,</p>
  
  <p>how can I refine my sybase command output(like grep in unix) and filter out only required output.</p>
  
  <p>Thanks in advance.</p>