Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

How do I delete? From Problem 8

Computer Science Mar 24, 2022

How do I delete? From Problem 8.1--8.4

Problem 2

Having created the table structure in Problem 1, write the SQL code to enter the first two rows for the table shown in Figure P8.2. Each row should be inserted individually, without using a subquery. Insert the rows in the order that they are listed in the figure.

OPTION 2:

Delete the entry with EMP_NUM of 100. It is important to delete this so that you would meet the expected output

 

This one:

 

100 News John G 2000-11-08 502

Expert Solution

SQL Queries have been given for the above questions in the explanation section.

 

The following table structure has been used for answering the above questions.

 EMP_1  Table

(EMP_NUM CHAR(3) PRIMARY KEY,

EMP_LNAME VARCHAR(15) NOT NULL, 

EMP_FNAME VARCHAR(15) NOT NULL, 

EMP_INITIAL CHAR(1),  

EMP_HIREDATE DATE,

JOB_CODE CHAR(3)

 

Please comment if you need any clarification or any doubt in this regard.

 

 

Step-by-step explanation

Due to some uploading issues with the DDL SQL statement, Please get the query from here. https://www.codepile.net/pile/rRr7r58n

 

Problem 2. 

image.png

 

Emp_1 table structure is created as per question 1.

The above 2  insert SQL statements inserts the data into EMP_1 table as 101 as EMP_NO,  News as EMP_LNAME, John as EMP_FNAME, 

G as EMP_INITIAL,  08-Nov-00 as EMP_HIREDATE, 501 as JOB_CODE.

 

 

OPTION 2:

image.png

 

The above SQL statement deletes the record from EMP_1 where EMP_NUM = 100

Archived Solution
Unlocked Solution

You have full access to this solution. To save a copy with all formatting and attachments, use the button below.

Already a member? Sign In
Important Note: This solution is from our archive and has been purchased by others. Submitting it as-is may trigger plagiarism detection. Use it for reference only.

For ready-to-submit work, please order a fresh solution below.

Or get 100% fresh solution
Get Custom Quote
Secure Payment