473,809 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 15727
"Brett Magill" <magillb@*nomai l*.sbcglobal.ne t> wrote in message
news:26******** **********@news svr14.news.prod igy.com...
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
2868
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 execute a command like this:
9
3694
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? roughly along the lines of select comp_col,'comp_col 2'= case when datalength(comp_col)<=100 then comp_col else left(comp_col,99) + '~' end, datalength(comp_col) from aTable
3
2272
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! Could someone please help! ***************************************************** Message 6 in thread From: fredg (fgutkind@att.net) Subject: Re: Row headings in a column-based report
17
16386
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 Google Groups for Distinct Count and Count, the Microsoft Help file (which apparently has bad links in Office 2003), and looked at other files, but I can't find the answer. The closest I've been able to get is to create a query to find the...
3
2764
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 of similar web pages for each table I'm looking into recording metadata about tables / columns in the database and using this to determine presentation. Let's keep things simple for now and assume that I'm interested in adding more user friendly...
0
1642
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 have a FK relationship on CAR_ID so the oracledataadapter1 select statement(CommandText) is: select car_master.car_id, car_master.year,car_master.vehicle,car_detail.car_id AS EXPR1,
1
1741
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 just how it was declared?
1
1198
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
3365
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 of 20 steps) On the admin page the steps are listed, in "order" order and the user can create new steps and assign an order and all is well. The problem may come in using a renumber function which should take the steps in their current order...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10640
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7662
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.