Re: mysql question
| From: | Datahntr | Date: | Thu, 13 Jul 2000 20:02:41 +0000 |
| Subject: | Re: mysql question | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1128@lists.php.net to get a copy of this message | ||
"Joanna" <joanna@blackhole.evilgeeks.com> wrote in message
news:Pine.LNX.4.21.0007131531310.2448-100000@blackhole.evilgeeks.com...
> I'm new to this world so please bare with me.
>
> I'm currently using php4 and mysql on w2k server, and so far so good
> I got everything running.
>
> I created few tables and inserted some information I would like to add
> another field to an existing table how do I do that? I know you got to use
> ALTER TABLE mytable ????????
The way to find this answer is to RTFM.
ALTER TABLE tablename ADD COLUMN column_def;
where column_def is some valid column definition such as "mynewcol
VARCHAR(10)".
Example: ALTER TABLE sess_track ADD COLUMN page VARCHAR(70);
adds a "page" column to the sess_track table.
That's in TFM (the mySQL manual, section 7.8), and that's a SQL question,
not a PHP question.
--
O.