On May 2, 2004, at 4:40 PM, [EMAIL PROTECTED] wrote:


Puneet Kishor <[EMAIL PROTECTED]> writes:

does anyone else miss the lack of a .desc <table|index|view> command in this
otherwise wonderful program? I find the .schema to be cumbersome, and it is
particularly difficult to get a nice list of columns and columntypes for a
given table. Unless, of course, I am missing something obvious...

Not obvious, but you do have an alternative.


sqlite> pragma table_info ( table_name );

will get you nice easily parsed (by machine or mind) output. It might be just
what you're looking for. Look at the online docs for more info on the various
pragmas: http://www.sqlite.org/lang.html#pragma



Thanks Derrell. I was, of course, looking for some way to get this via the Perl DBI. Couldn't afa I could tell. I made some really inelegant kluge of a hack where I parsed the output of SELECT ... sqlite_master using regexps, but just thinking of that makes me cringe.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to