Use PRAGMA table_info. <http://www.sqlite.org/pragma.html#schema>
- Jan
On 30.3.2005 11: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)
Thankx
NaveD. /--------------------------------------------------\
| Need Insurance? Netquote the oldest and |
| largest online quoting service. |
| Life Health Auto Home Renters and MORE |
| |
| http://www.netquote.com?nqid=10537&status=0002 |
|--------------------------------------------------|
| Register YourName @ MyPersonalEmail.com Today! |
| http://www.MyPersonalEmail.com |
| Free Email for a Global Community. |
\--------------------------------------------------/