List of MySQL datatypes?

List of MySQL datatypes?

am 29.01.2006 14:44:36 von circuit_breaker

Hi,

Is there's a built-in object inside of mySQL that hold its various
datatypes? As an example, I'd like to populate an array with the
following values: "BOOL", "INT","VARCHAR","MEDUIMINT","ENUM" and so on.

Thanks.

Re: List of MySQL datatypes?

am 29.01.2006 22:01:00 von Bill Karwin

"circuit_breaker" wrote in message
news:1138542276.556432.320230@g14g2000cwa.googlegroups.com.. .
> Hi,
>
> Is there's a built-in object inside of mySQL that hold its various
> datatypes? As an example, I'd like to populate an array with the
> following values: "BOOL", "INT","VARCHAR","MEDUIMINT","ENUM" and so on.

I don't know of a place that lists all of the supported datatypes.
If you use MySQL 5.0, you can use the information_schema database to get a
list of all datatypes currently in use in all databases on the system:

select distinct data_type from information_schema.columns order by 1

See http://dev.mysql.com/doc/refman/5.0/en/information-schema.ht ml for more
details about the information_schema database in MySQL 5.0.

Regards,
Bill K.

Re: List of MySQL datatypes?

am 30.01.2006 15:28:49 von circuit_breaker

Bill,

This is a *Very* good start for me. Using this workaround, I will just
have to create a "dummy" table using all of the MySql datatypes. You
saved the day ;-)

Thanks.

Bill Karwin wrote:
> "circuit_breaker" wrote in message
> news:1138542276.556432.320230@g14g2000cwa.googlegroups.com.. .
> > Hi,
> >
> > Is there's a built-in object inside of mySQL that hold its various
> > datatypes? As an example, I'd like to populate an array with the
> > following values: "BOOL", "INT","VARCHAR","MEDUIMINT","ENUM" and so on.
>
> I don't know of a place that lists all of the supported datatypes.
> If you use MySQL 5.0, you can use the information_schema database to get a
> list of all datatypes currently in use in all databases on the system:
>
> select distinct data_type from information_schema.columns order by 1
>
> See http://dev.mysql.com/doc/refman/5.0/en/information-schema.ht ml for more
> details about the information_schema database in MySQL 5.0.
>
> Regards,
> Bill K.