473,405 Members | 2,187 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,405 software developers and data experts.

Updating Column Descriptions (Comments)

Hello all,

Looking for some help here. BTW, to e-mail me directly, should you
prefer, take the *nomail*. out the reply address.

I uploaded data from another program ( GNU R-2.2.0 @ www.r-project.org )
into a MySQl (4.1.X ) database. R generated the tables for me, naming
the columns, setting field types, and inserting the records. This is
good, as it was about 100MB of data across 13 tables, each with between
50 and 200 fields in each table.

The original data file also has field descriptions, long comments
describing the contents of the column. Unfortunately, R does not add
the appropriate MySQL column comments. So, my question is, how can I
update these comments.

Right now, I have them in a format that would be easy to insert into a
MySQL table. Each comment is a row of data. The columns contain the
field names, which are the same as the field names in the MySQL database.

But, I cannot figure out how and where MySQL stores this metadata. Is
there a table that I can update directly with these values? Any help
would be appreciated.

This is on Linux, Ubuntu Breezy 5.10.

Thanks
Dec 15 '05 #1
1 15660
"Brett Magill" <magillb@*nomail*.sbcglobal.net> wrote in message
news:26******************@newssvr14.news.prodigy.c om...
The original data file also has field descriptions, long comments
describing the contents of the column. Unfortunately, R does not add the
appropriate MySQL column comments. So, my question is, how can I update
these comments.


CREATE TABLE has a syntax for a table option COMMENT = 'string'.
ALTER TABLE can take the same option:

ALTER TABLE myTable COMMENT = 'fee fie fo fum';

Likewise you can add comments to individual columns:

ALTER TABLE myTable CHANGE COLUMN myColumn
myColumn INTEGER COMMENT 'bee bie baz';

(that syntax requires that you first list the column name, and then the
whole column definition, including repeating the column name.)

You can see the comments if you show the table:

SHOW CREATE TABLE myTable;

Regards,
Bill K.
Dec 15 '05 #2

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

Similar topics

0
by: Dave Pylatuk | last post by:
Hello all. I have a question about updating a LONG datatype column in Oracle 8.1.7. I have a STUDENT table like: student_id INTEGER PK student_comments LONG I want to...
9
by: DMAC | last post by:
If i want to split a computed column into two or more columns based on the the length (its a varchar) of the computed column, how often will sql server determine what the computed column is?...
3
by: daveS | last post by:
I have come accross the exact same problem as below. The address that was given as a solution cannot be found. Specifically, i need to be able to show labels in only the first column of a report!...
17
by: keith | last post by:
I am trying to get a exact count of different distinct entries in an Access column. At first, I was trying to work with three columns, but I've narrowed it down to one to simplify it. I've searched...
3
by: Daniel M | last post by:
I'm building a medium-scale data-entry web application, which involves creating data entry forms, record listings and detail screens for lots of database tables. Rather than designing a series...
0
by: cwbp17 | last post by:
I'm having trouble updating individual datagrid cells. Have two tables car_master (columns include Car_ID, YEAR,VEHICLE) and car_detail (columns include Car_ID,PRICE,MILEAGE,and BODY);both tables...
1
by: Max | last post by:
Searched all over google and can't seem to find how to do this. How do I go about adding comments about my own functions and sub-procedures? Like when I use them, the tool-tip tells me more then...
1
by: Chris Calzaretta | last post by:
Hello, I need help with method descriptions for example when i say public var as new object.class and i go var.classmethod
33
by: bill | last post by:
In an application I am writing the user can define a series of steps to be followed. I save them in a sql database using the field "order" (a smallint) as the primary key. (there are in the range...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.