473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

List of MySQL datatypes?

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.

Jan 29 '06 #1
2 1917
"circuit_breaker" <ci*************@canada.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.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/...on-schema.html for more
details about the information_schema database in MySQL 5.0.

Regards,
Bill K.
Jan 29 '06 #2
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" <ci*************@canada.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.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/...on-schema.html for more
details about the information_schema database in MySQL 5.0.

Regards,
Bill K.


Jan 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Xenophobe | last post by:
I have a series of checkboxes and need to store their values in a MySQL table. I'm wondering what data type people recommend: varchar or text, exp. "True/False", "Yes/No" tinyint, exp. "0/1"...
133
by: jonathan | last post by:
hey all, I realize that this question might pop up from time to time, but I haven't seen it a while and things might of changed, so - Right now (July 2004) how does mysql stand up in...
2
by: shoa | last post by:
Hello I have an Access database that is used for a station computer. Now I want to update this database for a small network for about 4 computers (to share this database). I know that I can link...
33
by: Joshua D. Drake | last post by:
Hello, I think the below just about says it all: http://www.commandprompt.com/images/mammoth_versus_dolphin_500.jpg Sincerely, Joshua Drake
74
by: John Wells | last post by:
Yes, I know you've seen the above subject before, so please be gentle with the flamethrowers. I'm preparing to enter a discussion with management at my company regarding going forward as either...
11
by: Durai | last post by:
Hi All, I tested "concurrent testing" in MySQL. It works fine. But I couldn't do in PostgreSQL 7.3.4 on HPUX IPF. I got deadlock problem. I used the PHP script to update table( one script...
175
by: Sai Hertz And Control Systems | last post by:
Dear all, Their was a huge rore about MySQL recently for something in java functions now theirs one more http://www.mysql.com/doc/en/News-5.0.x.html Does this concern anyone. What I...
2
by: moller | last post by:
Im looking in to the possibility of moving from mySQL to an access database. My reasons are: (1) Database is single user. (2) Database local on users PC. (3) Database has only 8 tables where 4...
67
by: Bob Powell | last post by:
To whom it may concern: I find the recent articles in various trade publications a little disturbing due to the lack of PostgrSQL mention. I continue to see articles about how IBM may be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.