Hello, I guess my question is how I would add the new things to an existing table. For some of the tables that I asked for the answer for, have the same name for the tables that I made before, but this time have new names and values to it. How would I add to an existing table in MySql? I also copy and pasted each table that I need help with. The name of the tables is in Sans Serif font while the values I need to add to the table is in fixed width font. Thank you. Ch3_NoComp: CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(20), EMP_INITIAL varchar(1), EMP_FNAME varchar(20), DEPT_CODE varchar(4), JOB_CODE varchar(2) ); INSERT INTO EMPLOYEE VALUES('11234','Friedman','K','Robert','MKTG','12'); INSERT INTO EMPLOYEE VALUES('11238','Olanski','D','Delbert','MKTG','12'); INSERT INTO EMPLOYEE VALUES('11241','Fontein','','Juliette','INFS','5'); INSERT INTO EMPLOYEE VALUES('11242','Cruazona','J','Maria','ENG','9'); INSERT INTO EMPLOYEE VALUES('11245','Smithson','B','Bernard','INFS','6'); INSERT INTO EMPLOYEE VALUES('11248','Washington','G','Oleta','ENGR','8'); INSERT INTO EMPLOYEE VALUES('11256','McBride','','Randall','ENGR','8'); INSERT INTO EMPLOYEE VALUES('11257','Kachinn','D','Melanie','MKTG','14'); INSERT INTO EMPLOYEE VALUES('11258','Smith','W','William','MKTG','14'); INSERT INTO EMPLOYEE VALUES('11260','Ratula','A','Katrina','INFS','5'); BeneCo: CREATE TABLE EMPLOYEE ( EMP_CODE int, EMP_LNAME varchar(12), JOB_CODE int ) ENGINE = INNODB; INSERT INTO EMPLOYEE VALUES('14','Rudell','2'); INSERT INTO EMPLOYEE VALUES('15','McDade','1'); INSERT INTO EMPLOYEE VALUES('16','Ruellardo','1'); INSERT INTO EMPLOYEE VALUES('17','Smith','3'); INSERT INTO EMPLOYEE VALUES('20','Smith','2'); /* -- */ CREATE TABLE JOB ( JOB_CODE int, JOB_DESCRIPTION varchar(20) ) ENGINE = INNODB; INSERT INTO JOB VALUES('1','Clerical'); INSERT INTO JOB VALUES('2','Technical'); INSERT INTO JOB VALUES('3','Managerial');
Hello, I guess my question is how I would add the new things to an existing table. For some of the tables that I asked for the answer for, have the same name for the tables that I made before, but this time have new names and values to it. How would I add to an existing table in MySql? I also copy and pasted each table that I need help with. The name of the tables is in Sans Serif font while the values I need to add to the table is in fixed width font. Thank you. Ch3_NoComp: CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(20), EMP_INITIAL varchar(1), EMP_FNAME varchar(20), DEPT_CODE varchar(4), JOB_CODE varchar(2) ); INSERT INTO EMPLOYEE VALUES('11234','Friedman','K','Robert','MKTG','12'); INSERT INTO EMPLOYEE VALUES('11238','Olanski','D','Delbert','MKTG','12'); INSERT INTO EMPLOYEE VALUES('11241','Fontein','','Juliette','INFS','5'); INSERT INTO EMPLOYEE VALUES('11242','Cruazona','J','Maria','ENG','9'); INSERT INTO EMPLOYEE VALUES('11245','Smithson','B','Bernard','INFS','6'); INSERT INTO EMPLOYEE VALUES('11248','Washington','G','Oleta','ENGR','8'); INSERT INTO EMPLOYEE VALUES('11256','McBride','','Randall','ENGR','8'); INSERT INTO EMPLOYEE VALUES('11257','Kachinn','D','Melanie','MKTG','14'); INSERT INTO EMPLOYEE VALUES('11258','Smith','W','William','MKTG','14'); INSERT INTO EMPLOYEE VALUES('11260','Ratula','A','Katrina','INFS','5'); BeneCo: CREATE TABLE EMPLOYEE ( EMP_CODE int, EMP_LNAME varchar(12), JOB_CODE int ) ENGINE = INNODB; INSERT INTO EMPLOYEE VALUES('14','Rudell','2'); INSERT INTO EMPLOYEE VALUES('15','McDade','1'); INSERT INTO EMPLOYEE VALUES('16','Ruellardo','1'); INSERT INTO EMPLOYEE VALUES('17','Smith','3'); INSERT INTO EMPLOYEE VALUES('20','Smith','2'); /* -- */ CREATE TABLE JOB ( JOB_CODE int, JOB_DESCRIPTION varchar(20) ) ENGINE = INNODB; INSERT INTO JOB VALUES('1','Clerical'); INSERT INTO JOB VALUES('2','Technical'); INSERT INTO JOB VALUES('3','Managerial');
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Hello, I guess my question is how I would add the new things to an existing table. For some of the tables that I asked for the answer for, have the same name for the tables that I made before, but this time have new names and values to it. How would I add to an existing table in MySql? I also copy and pasted each table that I need help with. The name of the tables is in Sans Serif font while the values I need to add to the table is in fixed width font. Thank you.
Ch3_NoComp:
CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(20), EMP_INITIAL varchar(1), EMP_FNAME varchar(20), DEPT_CODE varchar(4), JOB_CODE varchar(2) ); INSERT INTO EMPLOYEE VALUES('11234','Friedman','K','Robert','MKTG','12'); INSERT INTO EMPLOYEE VALUES('11238','Olanski','D','Delbert','MKTG','12'); INSERT INTO EMPLOYEE VALUES('11241','Fontein','','Juliette','INFS','5'); INSERT INTO EMPLOYEE VALUES('11242','Cruazona','J','Maria','ENG','9'); INSERT INTO EMPLOYEE VALUES('11245','Smithson','B','Bernard','INFS','6'); INSERT INTO EMPLOYEE VALUES('11248','Washington','G','Oleta','ENGR','8'); INSERT INTO EMPLOYEE VALUES('11256','McBride','','Randall','ENGR','8'); INSERT INTO EMPLOYEE VALUES('11257','Kachinn','D','Melanie','MKTG','14'); INSERT INTO EMPLOYEE VALUES('11258','Smith','W','William','MKTG','14'); INSERT INTO EMPLOYEE VALUES('11260','Ratula','A','Katrina','INFS','5');
BeneCo:
CREATE TABLE EMPLOYEE ( EMP_CODE int, EMP_LNAME varchar(12), JOB_CODE int ) ENGINE = INNODB; INSERT INTO EMPLOYEE VALUES('14','Rudell','2'); INSERT INTO EMPLOYEE VALUES('15','McDade','1'); INSERT INTO EMPLOYEE VALUES('16','Ruellardo','1'); INSERT INTO EMPLOYEE VALUES('17','Smith','3'); INSERT INTO EMPLOYEE VALUES('20','Smith','2'); /* -- */ CREATE TABLE JOB ( JOB_CODE int, JOB_DESCRIPTION varchar(20) ) ENGINE = INNODB; INSERT INTO JOB VALUES('1','Clerical'); INSERT INTO JOB VALUES('2','Technical'); INSERT INTO JOB VALUES('3','Managerial');
Expert Solution
Step 1
CREATE TABLE EMPLOYEE:
CREATE TABLE command is used if you want to create a new table.
Then in brackets name of each column followed by its type.
ADD COLUMNS IN EXISTING TABLE (EMPLOYEE):
Use the ALTER Command to add the new columns in the existing table.
Step by step
Solved in 2 steps with 4 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education