in reply to What is similar in mssql to $dbh->listfields($tbl) in mysql

my $sth = $dbh->prepare ("select * from $tbl where 0 = 1");
$sth->execute;
my @names = @{$sth->{NAME_lc}};
Should work on all databases.
Other info available in {NAME}, {NAME_uc}, {TYPE}, {PRECISION}, {SCALE}, and {NULLABLE}

Enjoy, Have FUN! H.Merijn
  • Comment on Re: What is similar in mssql to $dbh->listfields($tbl) in mysql

Replies are listed 'Best First'.
Re^2: What is similar in mssql to $dbh->listfields($tbl) in mysql
by PugSA (Beadle) on Oct 24, 2006 at 11:42 UTC
    Thank You