stanleyhuen
asked on
count
how can I get the total number of records in a table of a database?
i would like to use PERL, DBI.
any one can provide me a simple source code?
i would like to use PERL, DBI.
any one can provide me a simple source code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In case you mean MetaData, well here are some methods used to obtain Meta Data:
$dbh->tables()
fetch a list of all accessible table names
$DBI::rows
The number of rows affected or returned
After executing the statement, use the statement handle to get:
$sth->{NUM_FIELDS}
The number of fields returned by a select
$sth->{NUM_PARAMS}
The number of parameters returned by any query
After a select query, the following attributes contain references to arrays of field-specific information:
$sth->{NAME}
Column names returned by the query
$sth->{NULLABLE}
Booleans indicating whether fields are nullable or not
$sth->{TYPE}
Field types
$sth->{PRECISION}
Floating-point precision of field
$sth->{SCALE}
Field lengths
$dbh->tables()
fetch a list of all accessible table names
$DBI::rows
The number of rows affected or returned
After executing the statement, use the statement handle to get:
$sth->{NUM_FIELDS}
The number of fields returned by a select
$sth->{NUM_PARAMS}
The number of parameters returned by any query
After a select query, the following attributes contain references to arrays of field-specific information:
$sth->{NAME}
Column names returned by the query
$sth->{NULLABLE}
Booleans indicating whether fields are nullable or not
$sth->{TYPE}
Field types
$sth->{PRECISION}
Floating-point precision of field
$sth->{SCALE}
Field lengths
ASKER
thanks yovavm,
i would like to learn more about DBI?
do u know any good resources of DBI?
i would like to learn more about DBI?
do u know any good resources of DBI?
Check: "Advanced Perl Programming", By Sriram Srinivasan, published by O'Reilly & Associates.
where can I get more information of these useful functions?