Updating a view in plsql

Answer: A QUESTION 23: CREATE OR REPLACE PACKAGE BB_PACK IS V_MAX_TEAM_SALARY NUMBER(12,2); PROCEDURE ADD_PLAYER(V_ID IN NUMBER, V_LAST_NAME VARCHAR2, V_SALARY_NUMBER; END BB_PACK; / CREATE OR REPLACE PACKAGE BODY BB_PACK IS PROCEDURE UPD_PLAYER_STAT (V_ID IN NUMBER, V_AB IN NUMBER DEFAULT 4, V_HITS IN NUMBER) IS BEGIN UPDATE PLAYER_BAT_STAT SET AT_BATS = AT_BATS V_AB, HITS = HITS V_HITS WHERE PLAYER_ID = V_ID) COMMIT; END UPD_PLAYER_STAT; PROCEDURE ADD_PLAYER (V_ID IN NUMBER, V_LAST_NAME VARCHAR2, V_SALARY NUMBER) IS BEGIN INSERT INTO PLAYER(ID, LAST_NAME, SALARY) VALUES (V_ID, V_LAST_NAME, V_SALARY); UPD_PLAYER_STAT(V_ID,0.0); END ADD_PLAYER; END BB_PACK; Which statement will successfully assign ,000,000 to the V_MAX_TEAM_SALARY variable from within a stand-alone procedure?

A value equal to the number of rows in the EMP table. Answer: C, E QUESTION 26: When creating a function in SQL *Plus, you receive this message: “Warning: Function created with compilation errors.” Which command can you issue to see the actual error message?

View Answer: A, B QUESTION 7: Which two statements describe the state of a package variable after executing the package in which it is declared? CREATE OR REPLACE TRIGGER check_sal BEFORE UPDATE OF sal ON emp FOR EACH ROW WHEN (* 1.1) BEGIN RAISE_APPLICATION_ERROR ( – 20508, ‘Do not decrease salary not increase by more than 10%’); END; Answer: B QUESTION 9: Examine this code: CREATE OR REPLACE PACKAGE bonus IS g_max_bonus NUMBER := .99; FUNCTION calc_bonus (p_emp_id NUMBER) RETURN NUMBER; FUNCTION calc_salary (p_emp_id NUMBER) RETURN NUMBER; END; / CREATE OR REPLACE PACKAGE BODY bonus IS v_salary employees.salary%TYPE; v_bonus employees.commission_pct%TYPE; FUNCTION calc_bonus (p_emp_id NUMBER) RETURN NUMBER IS BEGIN SELECT salary, commission_pct INTO v_salary, v_bonus FROM employees WHERE employee_id = p_emp_id; RETURN v_bonus * v_salary; END calc_bonus FUNCTION calc_salary (p_emp_id NUMBER) RETURN NUMBER IS BEGIN SELECT salary, commission_pct INTO v_salary, v_bonus FROM employees WHERE employees RETURN v_bonus * v_salary v_salary; END cacl_salary; END bonus; / Which statement is true?

Answer: A, E QUESTION 8: Which code can you use to ensure that the salary is not increased by more than 10% at a time nor is it ever decreased? ALTER TABLE emp ADD CONSTRAINT ck_sal CHECK (sal BETWEEN sal AND sal*1.1); B. CALC_SALARY packaged function from an INSERT command against the EMPLOYEES table.

This variable cannot be assigned a value from outside the package.

Which statement, when added to the above procedure will successfully invoke the UPD_BAT_STAT procedure? What is the most appropriate location to store the code that calculates the discounts?

You have a procedure PROCESS_CUSTOMER that processes customer information that is in the public synonym CUSTOMER table. Creating the table has no effect and procedure PROCESS_CUSTOMER still accesses data from public synonym CUSTOMER table. If the structure of your CUSTOMER table is the same as the public synonym CUSTOMER table then the procedure PROCESS_CUSTOMER is invalidated and gives compilation errors. If the structure of your CUSTOMER table is entirely different from the public synonym CUSTOMER table then the procedure PROCESS_CUSTOMER successfully recompiles and accesses your CUSTOMER table. If the structure of your CUSTOMER table is the same as the public synonym CUSTOMER table then the procedure PROCESS_CUSTOMER successfully recompiles when invoked and accesses your CUSTOMER table. SHOW ALL_ERRORS Answer: C QUESTION 27: Which four triggering events can cause a trigger to fire?

DBA_DEPENDENT_OBJECTS Answer: D, E QUESTION 15: Given a function CALCTAX: CREATE OR REPLACE FUNCTION calctax (sal NUMBER) RETURN NUMBER IS BEGIN RETURN (sal * 0.05); END; If you want to run the above function from the SQL *Plus prompt, which statement is true? You need to create a SQL *Plus environment variable X and issue the command EXECUTE : X := CALCTAX(1000); Answer: E QUESTION 16: What happens during the execute phase with dynamic SQL for INSERT, UPDATE, and DELETE operations? CALC_SALARY packaged function from an UPDATE command against the EMPLOYEES table. Use a drop procedure statement to drop a procedure that is part of a package. Instead, recompile the procedure using the alter procedure statement with the REUSE SETTINGS clause. For faster removal and re-creation, do not use a drop procedure statement. QUESTION 1: Examine this function: CREATE OR REPLACE FUNCTION CALC_PLAYER_AVG (V_ID in PLAYER_BAT_STAT. PLAYER_ID%TYPE) RETURN NUMBER IS V_AVG NUMBER; BEGIN SELECT HITS / AT_BATS INTO V_AVG FROM PLAYER_BAT_STAT WHERE PLAYER_ID = V_ID; RETURN (V_AVG); END; Which statement will successfully invoke this function in SQL *Plus? SELECT CALC_PLAYER_AVG(PLAYER_ID) FROM PLAYER_BAT_STAT; B.

Search for updating a view in plsql:

updating a view in plsql-3updating a view in plsql-2

When user A executes the DELETE_TEMP_TABLE procedure, under whose privileges are the operations performed by default?

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating a view in plsql”

  1. For example; camming pays while you’re online performing while clips and premium subscription services are able to generate money while you’re offline; clips from individual sales and subscriptions from the initial signups as well as rebills.