Michael A Chase [MAC], on Thursday, May 12, 2005 at 05:48 (-0700) has on mind:
MAC> I'd do something like this: MAC> my $sth = $dbh -> column_info( undef, $sSchema, $sTable, $sColumn ); MAC> my @sColumnInfo = (); MAC> eval { # The eval isn't needed if RaiseError == 0. MAC> @sColumnInfo = $sth -> fetchrow_array() || (); MAC> }; MAC> if ( ! @sColumnInfo ) { MAC> # The ALTER TABLE statement is likely to be RDBMS specific. MAC> $dbh -> do( "ALTER TABLE my_table ADD my_column VARCHAR(100)" ); MAC> } thanks a lot, will try that. It is script for me, I'll be the only user, and I want make sure that column is there :) -- How do you protect mail on web? I use http://www.2pu.net [But do you trust the _government_ with semi-automatic assault rifles?]