Question: Execute the following to build the 'yourfirstname _ new _ emps' table. A . Drop the existing table ( if it exists ) : DROP

Execute the following to build the 'yourfirstname_new_emps' table.
A. Drop the existing table (if it exists):
DROP TABLE yourfirstname_emps;
B. Create the new table and add additional column:
CREATE TABLE yourfirstname_new_emps AS SELECT * FROM employees;
ALTER TABLE yourfirstname_new_emps ADD stars VARCHAR2(50);
C. Create a PL/SQL block to insert asterisks into the 'stars' column based on the
employee's salary. Each asterisk represents $1,000 of salary. For example, a salary of
$7,800 should result in ?********, and a salary of $3,100 should result in ?****n. Use the
following code as a starting point and complete the 'FOR LOOP' section.
Note that the 'TRUNC()' removes the decimal portion after dividing the salary by 1,000.
E.g., for a salary of $7,800, it becomes 7.
DECLARE
v_empno yourfirstname_new_emps.employee_id%TYPE :=
Execute the following to build the 'yourfirstname

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!