Write SQL CODE to Add a new column in the table COURSE, name it "DEPT_CODE". Split the major code out of the CRS_CODE (i.e., take "ACCT" out of "ACCT-211"), and save that in the "DEPT_CODE" column.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question

Write SQL CODE to Add a new column in the table COURSE, name it "DEPT_CODE". Split the major code out of the CRS_CODE (i.e., take "ACCT" out of "ACCT-211"), and save that in the "DEPT_CODE" column.

Table: ENROLL
CLASS_CODE
10014
10014
10018
10018
10021
Table: PREREQUISITE
CRS_CODE
CIS-420
QM-261
QM-362
QM-362
Table: PROFESSOR
STU_NUM
321452
324257
321452
324257
321452
EMP_NUM DEPT_CODE PROF_OFFICE
103
HIST
104
ENG
105
ACCT
106
MKT/MGT
110
BIOL
DRE 156
DRE 102
KLR 229D
KLR 126
AAK 160
***
ENROLL_GRADE
с
B
A
B
с
PRE TAKE
CIS-220
MATH-243
MATH-243
QM-261
PROF_EXTENSION
6783
5561
8665
3899
3412
www
PROF_HIGH_DEGREE
Ph.D.
MA
Ph.D.
Ph.D.
Ph.D.
Transcribed Image Text:Table: ENROLL CLASS_CODE 10014 10014 10018 10018 10021 Table: PREREQUISITE CRS_CODE CIS-420 QM-261 QM-362 QM-362 Table: PROFESSOR STU_NUM 321452 324257 321452 324257 321452 EMP_NUM DEPT_CODE PROF_OFFICE 103 HIST 104 ENG 105 ACCT 106 MKT/MGT 110 BIOL DRE 156 DRE 102 KLR 229D KLR 126 AAK 160 *** ENROLL_GRADE с B A B с PRE TAKE CIS-220 MATH-243 MATH-243 QM-261 PROF_EXTENSION 6783 5561 8665 3899 3412 www PROF_HIGH_DEGREE Ph.D. MA Ph.D. Ph.D. Ph.D.
Table: CLASS
CLASS_CODE CRS_CODE CLASS_SECTION
10012
10013
10014
10015
10016
Table: COURSE
ACCT-211
ACCT-211
ACCT-211
ACCT-212
ACCT-212
CRS_CODE
ACCT-211
ACCT-212
CIS-220
CIS-420
MATH-243
Table: EMPLOYEE
1
2
3
1
2
CLASS_TIME
MWF 8:00-8:50
a.m.
Henry
Rosemary
Ronald
Preston
MWF 9:00-9:50
a.m.
TTh 2:30-3:45 p.m.
MWF 10:00-10:50
a.m.
Th 6:00-8:40 p.m.
CRS_DESCRIPTION
Accounting I
Accounting II
Intro. to Microcomputing
Database Design and Implementation
Mathematics for Managers
ROOM_CODE PROF_NUM
BUS311
BUS200
BUS252
BUS311
BUS252
***
♡ ♡ +3
3
105
4
105
342
CRS_CREDIT
3
3
301
301
EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_JOBCODE EMP_HIREDATE EMP_DC
100
Worley
James
F
CUST
2/23/1978 6/12/19
101
Ramso
B
CUST
11/15/1994 11/2/19
102
Edwards
TECH
7/23/1990
7/3/195
103
Donelly
PROF
7/1/1987 10/2/19
104
Yukon
PROF
5/1/1992 2/23/19
Transcribed Image Text:Table: CLASS CLASS_CODE CRS_CODE CLASS_SECTION 10012 10013 10014 10015 10016 Table: COURSE ACCT-211 ACCT-211 ACCT-211 ACCT-212 ACCT-212 CRS_CODE ACCT-211 ACCT-212 CIS-220 CIS-420 MATH-243 Table: EMPLOYEE 1 2 3 1 2 CLASS_TIME MWF 8:00-8:50 a.m. Henry Rosemary Ronald Preston MWF 9:00-9:50 a.m. TTh 2:30-3:45 p.m. MWF 10:00-10:50 a.m. Th 6:00-8:40 p.m. CRS_DESCRIPTION Accounting I Accounting II Intro. to Microcomputing Database Design and Implementation Mathematics for Managers ROOM_CODE PROF_NUM BUS311 BUS200 BUS252 BUS311 BUS252 *** ♡ ♡ +3 3 105 4 105 342 CRS_CREDIT 3 3 301 301 EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_JOBCODE EMP_HIREDATE EMP_DC 100 Worley James F CUST 2/23/1978 6/12/19 101 Ramso B CUST 11/15/1994 11/2/19 102 Edwards TECH 7/23/1990 7/3/195 103 Donelly PROF 7/1/1987 10/2/19 104 Yukon PROF 5/1/1992 2/23/19
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Multiple table
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,