Getting Default Values Out of MySQL

Carsten Haese carsten.haese at gmail.com
Sat Dec 12 10:54:29 EST 2009


Victor Subervi wrote:
> Hi;
> I'm using MySQLdb. If I do a
> cursor.execute('describe myTable;')
> it gives me all sorts of data but not my default values.

That function call doesn't "give" any data at all, except for the
rowcount (which would be the number of columns in the table). You must
use some other command to retrieve the result set. What command are you
using, and what are the results?

> How do I
> retrieve them?

In my version of MySQL, he default value is in the fifth column of the
result set.

--
Carsten Haese
http://informixdb.sourceforge.net




More information about the Python-list mailing list