Re: Novice trouble with plpgsql - Mailing list pgsql-sql

From wieck@debis.com (Jan Wieck)
Subject Re: Novice trouble with plpgsql
Date
Msg-id m12cDOA-0003kGC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: Novice trouble with plpgsql  (Patrik Kudo <kudo@partitur.se>)
List pgsql-sql
> try:
>
> select max(name_of_column) from name_of_table;
>
> Regards,
> Patrik Kudo
   He said PL/pgSQL!
   Try
       var := max(col) from table;
   instead. Looks a little odd, but should work.

>
> Alexander Stetsenko wrote:
> >
> > Hello All
> > Help me please !
> > I need to select max value in plpgsql, but
> > such code seems is not corect:
> >         select into var max(col) from table ;
> > How can I do this ?
> >
> > Thanks you all.
>
>


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #




pgsql-sql by date:

Previous
From: Joseph Shraibman
Date:
Subject: Re: Can't access a table. It seems to have been corrupted hsomehow
Next
From: Michael Fork
Date:
Subject: User/Groups