Look in the manual the ALTER TABLE command. I don't remember the syntax but it can be done.
Adolfo On Sat, 2002-12-21 at 18:56, Jeffrey Ellis wrote: > Hi, Adolfo-- > > Thank you again! > > However, the problem is, the table is linked to a file on the web. If I > create a new table with a different name the link wont work and no data will > be entered. > > Is there a way to rename a table once you create it? Then, I could delete > the old table after I create the new one, and then rename the new one to the > old name so it will work with the website. > > All My Best, > Jeffrey > > > on 12/21/02 2:02 PM, Adolfo Bello at [EMAIL PROTECTED] wrote: > > > CONCAT(FullName,' ',Address) > > > > regarding the lack of an ID field, create a new table with all the > > fields from the original table plus an ID field, auto_numeric, and > > insert the registers from the old table to the new one. Then, use the > > UPDATE on the new table. > > > > Adolfo > > > > On Sat, 2002-12-21 at 17:35, Jeffrey Ellis wrote: > >> Hi, Adolfo-- > >> > >> Thank you! > >> > >> But I have two problems here...First, I (whoops!) don't have an id field. In > >> the program I use, you can only set a key field when you first create the > >> database. I would love to have an id field, but don't know how to create one > >> now. :( > >> > >> The second is that the command will -- I think -- place the last name right > >> up against the first name with no space before. Is there a way to do that so > >> it looks like "Foo Bar"? > >> > >> All My Best, > >> Jeffrey > >> > >> > >> on 12/21/02 1:23 PM, Adolfo Bello at [EMAIL PROTECTED] wrote: > >> > >>> The following query adds NAME and ADDRESS (where the last name is > >>> wrongly placed) and set ADDRESS to an empty string. > >>> > >>> UPDATE tablename SET FullName=CONCAT(FullName,Address),Address='' > >>> WHERE ID=<the register id> > >>> > >>> Adolfo > >>> > >>> On Sat, 2002-12-21 at 17:07, Jim Hankins wrote: > >>>> Jeff, > >>>> > >>>> Are you looking for an update table syntax? > >>>> > >>>> Example > >>>> Update tablename > >>>> Set FullName="Their Full Name" where someotherfield="someother value"; > >>>> > >>>> Careful with this one. As if you omit the where clause it will update > >>>> every record! > >>>> > >>>> > >>>> > >>>> -----Original Message----- > >>>> From: Jeffrey Ellis [mailto:[EMAIL PROTECTED]] > >>>> Sent: Saturday, December 21, 2002 3:52 PM > >>>> To: [EMAIL PROTECTED] > >>>> Subject: MySQL Command to edit a single record > >>>> > >>>> Hi-- > >>>> > >>>> I have just begun using MySQL...I am using a program called MySQL to > >>>> manage > >>>> an online database. I can see the entire table I need and all the > >>>> records in > >>>> that table for the db Iım working with. I have a field called fullname > >>>> which > >>>> is supposed to receive the full name of the person entering the > >>>> information. > >>>> But sometimes, folks are entering their first name only in this field > >>>> and > >>>> then entering their last name in the address field by mistake. I would > >>>> like > >>>> to be able to send a command to the database to be able manually edit > >>>> those > >>>> records to add the last name back into the fullname field. > >>>> > >>>> Is there a way to do this? > >>>> > >>>> All My Best, > >>>> Jeffrey Ellis > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> --------------------------------------------------------------------- > >>>> Before posting, please check: > >>>> http://www.mysql.com/manual.php (the manual) > >>>> http://lists.mysql.com/ (the list archive) > >>>> > >>>> To request this thread, e-mail <[EMAIL PROTECTED]> > >>>> To unsubscribe, e-mail > >>>> <[EMAIL PROTECTED]> > >>>> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > >>>> > >> > -- Adolfo Bello <[EMAIL PROTECTED]> --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php