Select SQL Server database size

前端 未结 10 889
遇见更好的自我
遇见更好的自我 2020-11-30 16:47

how can i query my sql server to only get the size of database?

I used this :

use \"MY_DB\"
exec sp_spaceused

I got this :

<
10条回答
  •  有刺的猬
    2020-11-30 17:20

    EXEC sp_spaceused @oneresultset = 1 show in 1 row all of the result

    if you execute just 'EXEC sp_spaceused' you will see two rows Work in SQL Server Management Studio v17.9

提交回复
热议问题