Re: modify default value

2007-09-15 Thread Baron Schwartz
Yes, use ALTER TABLE tbl ALTER COLUMN col SET DEFAULT 'foo'; and you won't rebuild the whole table. You know, you can also just manually specify a value for that column in the LOAD DATA INFILE statement. I think you can anyway -- I always have to check the syntax on that one. Baron Bernd J

modify default value

2007-09-15 Thread Bernd Jagla
Hi, I am mass-importing A LOT of csv tables. In order to distinguish between files I change the default value for the table before doing a "load data infile.." from a Perl script: ALTER TABLE `data` MODIFY COLUMN `sample_id` INTEGER UNSIGNED NOT NULL DEFAULT $sample_id[$idx] After importin