I am having a little bit of a problem with creating and


Hello

I am having a little bit of a problem with creating and inserting  a MySQL table that will hold a list of category ,Option, budget, purchase tables . I am not to sure how to create the tables in my sql and insert a dummy data into it  ?inserting  a MySQL table that will hold a list of category ,Option, budget, purchase tables . I am not to sure how to create the tables in my sql and insert a dummy data into it  ? Can you please correct me or show me how to create and insert inorder to provide a working sql query? insert inorder to provide a working sql query?

CREATE TABLE CATEGORY(

  CATAGORY_ID VARCHAR(10) NOT NULL ,

  CATTYPE VARCHAR(35)NOT NULL,

  CATDESCREPTION VARCHAR(100) NOT NULL,

  PRIMARY KEY (CATEGORY_ID)

)

 INSERT INTO CATEGORY VALUES (1, "WINDOW", " INTERIOR PILLAR WINDOW" );

CREATE TABLE OPTION(

  ITEM_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,

  DESCREPTION VARCHAR(35) NOT NULL,

  MATERIALCOST DECIMAL(8 2) NOT NULL,

  ITEMQUANTITY DECIMAL(8 2) NOT NULL;

  PRIMARY KEY (item_id),

  FOREIGN KEY (category_id) REFERENCES category (category_id),

  FOREIGN KEY (sub_id) REFERENCES categories (sub_id)

)

INSERT INTO OPTION VALUES (1, "CASEMENT", " INTERIOR GLASSWINDOW" );

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: I am having a little bit of a problem with creating and
Reference No:- TGS02551673

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)