default values for 13 fields mysql -
so have database schema below (3 tables) , whole purpose of map nutrient fact table package. thing is, want have @ 13 fields in nutrient fact table each package should have (even if they're empty), current schema works entries contain data. how can assign 13 default component name package (along unit of measure , daily value)?
create table packageid( packageid int not null primary key ); create table component( componentid int not null primary key, component_name text ); create table product_component( packageid int, componentid int, amount varchar(7), unit_of_measure varchar(7), daily_value varchar(7), foreign key (componentid) references component(componentid), foreign key (packageid) references package(packageid) );
Comments
Post a Comment