Is it possible to comment the fields in a table in Mysql?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Is it possible to comment the fields in a table in Mysql?

Post by raghavan20 »

I am wondering is it possible in MYSQL to comment all the fields in every table as it is possible with MS ACCESS?
User avatar
J_Iceman05
Forum Commoner
Posts: 72
Joined: Wed Aug 03, 2005 10:52 am
Location: Las Vegas, NV

Post by J_Iceman05 »

what do you mean by commenting all the fields in every table... not access them, or what? why would you need to comment them anyway?
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

If you had worked with MS Access, you would hv known it
for ex:
there exists a table

Code: Select all

FieldName		Comment
-----------------------------------------------------------
OrderId			Unique id of every order
Date			Date on which the order is made
MemberId		The member who has made the order
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

i think there may be incompatibilities existing in the syntax of SQL. you are better off writing query and executing in MySQL (or may be convert a query from MS Access :? )

EDIT: scrap above answer... i misunderstood your question.. yeah, i think its possible.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

It's not possible for MyISAM tables. There's a short space available for a comment, but it's not much. InnoDB tables may accept a comment for each column..

EDIT: After doing a little (like, 30 seconds) research it appears that InnoDB tables are even more useless for comments than MyISAM. MySQL puts table space data in the comment.. not good.
Post Reply