Unit 4 Assignment
December 12, 2014
Professor Waters
Kaplan University
1. Update the employee table, add a salary column (Number type with 7 length) into the employee table. Use a number format with a 2 digit decimal from the right.
ALTER TABLE employee ADD salary number (7,2);
Select salary from employee;
2. Update the employee table and provide a salary for each employee using the salary column added in the previous problem. Validate the rows are there using a SELECT clause.
UPDATE employee
SET salary = 50000;
select salary from employee;
3. Use a cursor FOR loop to retrieve the blog id, blog url and blog description if the blog id is less than 4 and place it in a cursor variable.
Fetch and process each record and insert a row in the table log for each blog id returned.
DECLARE …show more content…
Create a table-based record cursor that utilizes all of the columns in the division table if the id is 2. Declare the division cursor variable with the table-based cursor attribute. Output the division id and division name to the screen.