On 30 Mar 2005, at 04:05, [EMAIL PROTECTED] wrote:

I need to be able to read all table names in the database, and further all attribute
names in each table. ( am using DBD::SQLite in Perl)
For gathering all the table names I've used the sqlite_master table. The problem
is that the information on the attributes of each table is returned as a string
:
eg:
Type : table
Name : names
Table Name : names
Root Page : 2 CREATE TABLE names (id INTEGER PRIMARY KEY, name)


I plan to use the SQL::Parser library in order to derive all attribute information
from this string. Is there a better way to go about it ?
My aim is to find something equivalent to "DESC tablename" (used in sqlplus)

There is core DBI support for this (which DBD::SQLite talks to). See the table_info section of the DBI man page.



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

Reply via email to