-----Ursprüngliche Nachricht----- Von: David Bujard [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 16. Februar 2001 16:02 An: Kristofer Wolff Betreff: Re: DBI Dear Kristofer, 1. You can add columns to your table through SQL, just as you add records to your table. So this isn't precisely a perl question. 2. Use an alter table SQL statement. Hit a search engine for the keywords "SQL reference" and "alter table" and you should find resources to help you. A quick example is: ALTER TABLE tablename ADD (newfieldname datatype(length)) A reference will give you good examples for the possible datatype and length values. 3. With better table design, you wouldn't have to add columns on the fly like this. If you find yourself naming fields "Atribute1" and "attribute2", then there's a many-to-one relationship between attributes and products, and you should really store products in one table and attributes in second table, each with a foreign key identifying to which product it refers. Of course, redesigning your database would not be "quick and fast". If you find this answer helpful, please post it to the group. Good luck, David Bujard Keyware, Solutions Division ----- Original Message ----- From: "Kristofer Wolff" <[EMAIL PROTECTED]> To: "perllist" <[EMAIL PROTECTED]> Sent: Friday, February 16, 2001 10:53 AM Subject: DBI > quick and fast: > > hi all, > > does sombody know, how i can add a col in a table of a database ?? > XBASE, SYBASE and DB2 ??? > > -- > I have a Atributes table, and the user must add artibutes, so my tables > looks like: > > *********** *********** *********** > * Prod.NR * * atr 1 * * atr 2 * > -------- --------- --------- > 1 bla blub > 2 palimm palimm > ------------------------------------ > > Know I create an Atribute 3 and want to add a col named atr 3, but I can > nothing find in the docs ! > > _______________________________________________ > Perl-Win32-Web mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web > _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
