Fill This Form To Receive Instant Help
Homework answers / question archive / How do I delete? From Problem 8
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
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.
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:
The above SQL statement deletes the record from EMP_1 where EMP_NUM = 100