Does anyone know how to check for the existance of a specific table, column,
and/or keys within MySQL?
For instance, I need to run an ALTER TABLE command to change a column name,
but only want to do this if it hasn't been done already.
In MS SQL Server 7, I would do something like:
if exists (select * from sysobjects where id =
object_id(N'[dbo].[system_registry]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1)
alter table system_registry ....
go
I not only need to check columns names, but if various primary keys have
been established (and if not, create them).
Thanks in advance,
--Tim
tchi@stripped