Adding fields to db table (primary key and other type)
------=_NextPart_000_00A2_01C52A38.67D3DC00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
I am using MySQL Command Line and have created a table called =
dtd_test. It has two varchar fields at the moment. How can I add more =
fields? I want to add a primary key column which autoincrements, how =
can I do that? Thanks a lot
------=_NextPart_000_00A2_01C52A38.67D3DC00--
Re: Adding fields to db table (primary key and other type)
http://dev.mysql.com/doc/mysql/en/alter-table.html
ALTER TABLE dtd_test ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT, ADD
PRIMARY KEY (id);
On Wed, 16 Mar 2005 14:56:59 -0500, Ed <edward [at] prodevmedarc.com> wrote:
> Hi all,
> I am using MySQL Command Line and have created a table called dtd_test. It has two varchar fields at the moment. How can I add more fields? I want to add a primary key column which autoincrements, how can I do that? Thanks a lot
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql [at] m.gmane.org
Re: Adding fields to db table (primary key and other type)
Check out the alter table syntax in the manual at:
http://dev.mysql.com/doc/mysql/en/alter-table.html
On Wed, 16 Mar 2005 14:56:59 -0500, Ed <edward [at] prodevmedarc.com> wrote:
> Hi all,
> I am using MySQL Command Line and have created a table called dtd_test. It has two varchar fields at the moment. How can I add more fields? I want to add a primary key column which autoincrements, how can I do that? Thanks a lot
>
--
Eric Bergen
eric.bergen [at] gmail.com
http://www.ebergen.net
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql [at] m.gmane.org