create table db_column ( tab_id int not null , col_num int not null , col_name varchar(50) not null , col_data_type int not null , col_data_type_name varchar(50) not null , col_charlength int , col_precision int , col_scale int , col_nullity char(1) not null , constraint db_column0 primary key ( tab_id , col_num ) ) #### my $addcol = $dbh->prepare( "insert into db_column ( tab_id , col_num , col_name , col_data_type , col_data_type_name , col_charlength , col_precision , col_scale , col_nullity ) values (?, ?, ?, ?, ?, ?, ?, ?, ?)"); # later.... $addcol->execute( $tabid, $ck->{order}, $colname, $ck->{type}, $dbh->sql_typename($ck->{type}), $ck->{charlength}, $ck->{precision}, $ck->{scale}, ($ck->{nullity}? 'Y' : 'N')) or warn "Couldn't insert into db_column: $DBI::errstr";