Posted by M A Srinivas on 06/12/07 09:47
On Jun 12, 12:35 pm, visu <k.vis...@gmail.com> wrote:
> I want to know following memory space related question.
>
> 1 . How can i get a Database Size by means of a SQL query?
>
> 2. How can i Get a field size (not allocated space) .. ie. i am
> storing some textual data to a field..
> after a insertion i want to know how much space has been occupied by
> that particular field .
>
> ex sno product_name Description
> 1 sample1 dfkjsdkfj kldsjfkdjk
> sdkjdfskdjk vcmvxcvmcvnksdjfkdsn m
>
> Here i want know the space occupied by the field name "description"
> for the product id=1.
>
> Thanks in adavance
>
> Regards
> Visu.
1. How can i get a Database Size by means of a SQL query
sp_helpdb 'dbname'
2. Here i want know the space occupied by the field name "description"
for the product id=1.
SELECT SUM(DATALENGTH(description)) FROM table
WHERE product_id=1.
Navigation:
[Reply to this message]
|