Re: columns no more

2002-05-11 Thread Victoria Reznichenko

John,
Saturday, May 11, 2002, 3:13:33 AM, you wrote:

JD> is there a way to delete a column from a table, without droping the whole 
JD> table?

Sure, you can use ALTER TABLE:
  http://www.mysql.com/doc/A/L/ALTER_TABLE.html

JD> If not is can I get sql to replicate the command to re create the table?
JD> and if I can't do that how can I transfer information to a dummy table while 
JD> I create the table I want?

CREATE .. SELECT? Look at:
   http://www.mysql.com/doc/C/R/CREATE_TABLE.html

JD> PS, I only have command line access
JD> J




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




-
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




Re: columns no more

2002-05-10 Thread Seth Northrop


> is there a way to delete a column from a table, without droping the
> whole table?

Yep!

ALTER TABLE  DROP [COLUMN] col_name
http://www.mysql.com/doc/A/L/ALTER_TABLE.html

> If not is can I get sql to replicate the command to re create the table?

Yep!

mysqldump -qd -u   
http://www.mysql.com/doc/m/y/mysqldump.html

> can I transfer information to a dummy table while
> I create the table I want?

Yep!

Just do a select into outfile
http://www.mysql.com/doc/S/E/SELECT.html

then a load data infile
http://www.mysql.com/doc/L/O/LOAD_DATA.html

Take care,
seth



-
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




columns no more

2002-05-10 Thread John Doe

is there a way to delete a column from a table, without droping the whole 
table?
If not is can I get sql to replicate the command to re create the table?
and if I can't do that how can I transfer information to a dummy table while 
I create the table I want?

PS, I only have command line access

J

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-
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