On Tue, 4 Dec 2007 12:36:43 -0800, dave wrote:
> Right - clear questions defintiely get clearer answers. Let me try again
> with the (hopefully) correct terminology... 
>
> Looking back at what I'm trying to do - I'm not even sure that
> inserting/importing is what it is. So...
>
> ...I have an existing database (I'm using oscommerce), with many existing
> columns and rows. I want to add an oscommerce module, and as part of that,
> they are asking me to " Use a database editor (e.g., phpMyAdmin) to alter
> your database (or use the included sql file price-break_v1_2_0.sql
> instead):"
Oh, much better....
>
> alter table products add column products_price1 decimal(15,4) not null
> default 0.0;
> alter table products add column products_price2 decimal(15,4) not null
> default 0.0;
> alter table products add column products_price3 decimal(15,4) not null
> default 0.0;
> alter table products add column products_price4 decimal(15,4) not null
> default 0.0;
> alter table products add column products_price5 decimal(15,4) not null
> default 0.0;
> alter table products add column products_price6 decimal(15,4) not null
> default 0.0;
> alter table products add column products_price7 decimal(15,4) not null
> default 0.0;
> alter table products add column products_price8 decimal(15,4) not null
> default 0.0;
> alter table products add column products_price1_qty int not null default 0;
> alter table products add column products_price2_qty int not null default 0;
> alter table products add column products_price3_qty int not null default 0;
> alter table products add column products_price4_qty int not null default 0;
> alter table products add column products_price5_qty int not null default 0;
> alter table products add column products_price6_qty int not null default 0;
> alter table products add column products_price7_qty int not null default 0;
> alter table products add column products_price8_qty int not null default 0;
> alter table products add column products_qty_blocks int not null default 1;
>
> So I guess I want to "alter" my database? Hmmm.... Definitely delving into
> areas where maybe I ought not to...
Yup! Alter is what you want. Each of the lines above is a command to
alter (change) a table (products) to add a column named whatever of a
particular type, disallowing that the column can be null, and providing
a (possibly redundant) default value.
So, the next question is do you ave some kind of access to your databse
that would allow you to make changes to tables, such as the mysqlp
command line interface, or phpMyAdmin, or SQLYog, or anything else?
--
Technical points aside, you could probably beat someone to
death with a Newton if you had to. Try that with a Palm Pilot!
--Dan Duncan in comp.sys.newton.misc