Re: PLEASE HELP !!! Looking for SQL command

Поиск
Список
Период
Сортировка
От Gerard H. Pille
Тема Re: PLEASE HELP !!! Looking for SQL command
Дата
Msg-id 3E14A58C.9000609@skynet.be
обсуждение исходный текст
Список pgsql-general
D C Patel wrote:
> Hi,
>    I have a table which has a field "session-id" & a variable length field.
> The table is updated with entries for different session-id's.
>
> I want to know if there is a command by which I can calculate
> the total size (in bytes) for all entries corresponding to a "session-id".
>
> In other words
>
> For (i = 1 to Number of rows corresponding to the session-id )
> {
>    Total Size = Total Size + Size of (All elements in row[i])
> }
>
> Regards,
> D C Patel

select sum(length(var_length_field)) from the_table_i_have where
session_id = a_session_id;

--

Gerard H. Pille


В списке pgsql-general по дате отправления:

Предыдущее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Re: [HACKERS] Cast your vote ...
Следующее
От: "Peter Depuydt"
Дата:
Сообщение: Datatype SET or enumeration type ?