On Thu, 01 Nov 2001 18:56:18 -0800, Venkataramana Mokkapati wrote:

>How do I get column names and order of column names
>for a "select * from ..." query.

If you have

        $sth = $dbh->prepare("select * from ...");

then try

        @column_names = @{$sth->{NAME}};

You may have to do an "execute" first, for this to return anything of
value.

It's in the DBI docs under the heading "Statement Handle Attributes", in
the DBI POD formatted as text around line 2284.

-- 
        Bart.

Reply via email to