ms sql help

  • I have a table with 10 columns, i need to select 5 columns ( colum name are date,dbname,tabname,size_used,size_reserved,these are the column names i need to select)now i have to select top 15 records which have used (size_used) most. space for the date='2008-12-25'

    thank you

  • select top 15 date,dbname,tabname,size_used,size_reserved

    from myTable

    where date = '2008-12-25'

    order by size_used desc

    I guessed your table name - replace myTable as appropriate 🙂

  • Oh, and you should probably read this article http://www.sqlservercentral.com/articles/Best+Practices/61537/ - a good name for your post would go a long way to getting people's attention for your question earlier 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply