Claire,
>I want to check if a column exists in a table before I
>do an alter table to add it. How do I do this in
>mysql? Thanks.
If you are using MySQL 5.0, query information_schema.columns
(http://dev.mysql.com/doc/mysql/en/columns-table.html) for the table and
column. Otherwise use SHOW COLUMNS FROM tablename.
PB
http://www.artfulsoftware.com
-----
Claire Lee wrote:
>I want to check if a column exists in a table before I
>do an alter table to add it. How do I do this in
>mysql? Thanks.
>
>Claire
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.6/111 - Release Date: 9/23/2005