SlideShare a Scribd company logo
Which line number has error in the following program?
CREATE OR REPLACE PROCEDURE p2
is
Begin
Insert into enp(empno,ename,sal)
values(11,'John',1111);
Drop table dept;
Delete from salgrade;
Rollback;
End;
Select an answer
A. 2
B. 5
*C. 7
D. 4
The mechanisms that prevent destructive interaction between transactions
accessing the same resource is called:
Select an answer
*A. Lock
B. Transaction
C. Interaction
D. None of the options are correct
The ________ statement is a data definition language statement and generates no
rollback information.
Select an answer
A. ROLLBACK
B. TRANSACT
*C. TRUNCATE
D. None of the options are correct
Which of the statements must be used inside a PL/SQL block to remove data from a
table?
Select an answer
A. DROP
B. MERGE
C. DROP
*D. DELETE
Which view displays indirect dependencies, indenting each dependency?
Select an answer
A. DEPTREE
*B. IDEPTREE
C. INDENT_TREE
D. I_DEPT_TREE
What is the scope of a local declaration?
Select an answer
A. Subprogram
B. Session
*C. Block
D. Schema
A database transaction ends with one of the following commands.
Select an answer
A. Exit command
B. Stop command
*C. Commit command
D. None of the options are correct
You need to create a trigger on the EMP table that monitors every row that is
changed and places this information into the AUDIT_TABLE. Which type of trigger
do you create?
Select an answer
A. Statement-level trigger on the EMP table
B. For each row trigger on the EMP table
C. Statement-level trigger on the AUDIT_TABLE table
D. For each row statement level trigger on the EMP table
*E. For each row trigger on the AUDIT_TABLE table
You can control the logic of transactions by using the following statement/s.
(Please select ALL that apply)
Select an answer
*A. COMMIT
*B. SAVEPOINT
*C. ROLLBACK
D. None of the options are correct
Which of the following is NOT VALID declaration?
Select an answer
A. Bool boolean;
*B. NUM1, NUM2 number;
C. deptname dept.dname%type;
D. date1 date := sysdate;
Find the ODD one out of the following.
Select an answer
A. OPEN
B. CLOSE
*C. INSERT
D. FETCH
Find the ODD one out of the following.
Select an answer
A. OPEN
B. CLOSE
C. INSERT
D. FETCH
Which three describes a stored procedure?
(Please select ALL that apply)
Select an answer
A. A stored procedure is typically written in SQL
*B. By default, a stored procedure executes with the privileges of its
owner
C. A stored procedure has three parts: the specification, the body, and
the exception handler part
*D. A stored procedure is stored in the database and can be shared by a
number of programs
*E. A stored procedure offers some advantages over a standalone SQL
statement, such as programmable functionality and compiled code
You need to create a DML trigger. Which five pieces need to be identified?
(Please select ALL that apply)
Select an answer
*A. table
*B. DML event
*C. trigger body
D. package body
*E. trigger name
*F. trigger timing
Examine this code:
CREATE OR REPLACE PACKAGE prod_pack
IS
g_tax_rate NUMBER := .08;
END prod_pack;
Which statement about this code is true?
Select an answer
A. This package specification can exist without a body
B. This package body can exist without a specification
C. This package body cannot exist without a specification
*D. This package specification cannot exist without a body
How can a PL/SQL block be executed?
Select an answer
A. By using a semi colon at the end
B. By using a colon at the end
C. By using a slash (/) at the end
*D. By pressing "Enter"
Question: 16 of 30
lt043993enQ0128
Which part of a database trigger determines the number of times the trigger body
executes?
Select an answer
*A. TRIGGER TYPE
B. TRIGGER BODY
C. TRIGGER EVENT
D. TRIGGER TIMING
Examine this procedure:
CREATE OR REPLACE PROCEDURE UPD_BAT_STAT
(V_ID IN NUMBER DEFAULT 10, V_AB IN NUMBER DEFAULT 4)
IS
BEGIN
UPDATE PLAYER_BAT_STAT SET AT_BATS =
AT_BATS + V_AB WHERE PLAYER_ID = V_ID;
COMMIT;
END;
Which two statements will successfully invoke this procedure in SQL *Plus?
(Please select ALL that apply)
Select an answer
*A. EXECUTE UPD_BAT_STAT;
*B. EXECUTE UPD_BAT_STAT(V_AB=>10, V_ID=>31);
C. EXECUTE UPD_BAT_STAT(31, .FOUR., .TWO.);
D. UPD_BAT_STAT(V_AB=>10, V_ID=>31);
What is a condition predicate in a DML trigger?
Select an answer
A. A conditional predicate allows you to specify a WHEN-LOGGING-ON
condition in the trigger body
B. A conditional predicate means that you use the NEW and OLD
qualifiers in the trigger body as a condition
*C. A conditional predicate allows you to combine several DBM triggering
events into one in the trigger body
D. A conditional predicate allows you to specify a SHUTDOWN or STARTUP
condition in the trigger body
The ADD_PLAYER, UPD_PLAYER_STAT, and UPD_PITCHER_STAT procedures are grouped
together in a package. A variable must be shared among only these procedures.
Where should you declare this variable?
Select an answer
*A. In the package body
B. In the data base triggers
C. In the package specification
D. In the procedures, declare section using the exact name in each
What are the conditions when a record variable is assigned to +D135another
record variable, the target variable is declared with a RECORD type, and the
source variable is declared with %ROWTYPE?
Select an answer
A. An error is thrown
*B. The assignment is successful only when their fields match in number
and order, and corresponding fields have the same data type
C. The assignment is successful as long as the fields in both source
and target have the same datatype, even if they do not match in number and order
D. The assignment is successful only when their fields match in number,
and corresponding fields have the same data type. The order of the fields does
not matter
How can a user defined exception be raised?
Select an answer
*A. Using RAISE statement only
B. Using RAISE statement or RAISE_APPLICATION_ERROR function
C. Using INVOKE statement or RAISE statement
D. Using RAISE statement or RAISE_APPLICATIOn_ERROR procedure
Which of the following is not correct about an exception?
Select an answer
*A. Raised explicitly /automatically in response to an ORACLE_ERROR
B. An exception will be raised when an error occurs in that block
C. Process terminates after completion of error sequence
D. A procedure of sequence of statements may be processed
You have created a stored procedure DELETE_TEMP_TABLE that uses dynamic SQL to
remove a table in your schema. You have granted the EXECUTE privilege to user A
on this procedure. When user A executes the DELETE_TEMP_TABLE procedure, under
whose privileges are the operations performed by default?
Select an answer
A. SYS privileges
*B. Your privileges
C. Public privileges
D. User A.s privileges
E. User A cannot execute your procedure that has dynamic SQL
Examine this code:
CREATE OR REPLACE PRODECURE add_dept
(p_dept_name VARCHAR2 DEFAULT .placeholder .,
p_location VARCHAR2 DEFAULT .Boston .)
IS
BEGIN
INSERT INTO departments VALUES
(dept_id_seq.NEXTVAL, p_dept_name, p_location);
END add_dept; /
Which three are valid calls to the add_dep procedure?
(Please select ALL that apply)
Select an answer
*A. add_dept;
*B. add_dept( .Accounting .);
C. add_dept(, .New York .);
*D. add_dept(p_location=> .New York .);
Examine the trigger:
CREATE OR REPLACE TRIGGER Emp_count
AFTER DELETE ON Emp_tab
FOR EACH ROW
DELCARE n INTEGER;
BEGIN SELECT COUNT(*)
INTO n FROM Emp_tab;
DMBS_OUTPUT.PUT_LINE
( . There are now . || a || . employees, .);
END;
This trigger results in an error after this SQL statement is entered: DELETE
FROM Emp_tab WHERE Empno = 7499; How do you correct the error?
Select an answer
A. Change the trigger type to a BEFORE DELETE
B. Take out the COUNT function because it is not allowed in a trigger
C. Remove the DBMS_OUTPUT statement because it is not allowed in a
trigger
*D. Change the trigger to a statement-level trigger by removing FOR EACH
ROW
_____________ pragma is used to attach a user defined error name with predefined
error number.
Select an answer
A. AUTONOMOUS TRANSACTON
*B. EXCEPTION_INIT
C. ERROR_INIT
D. RESTRICT_REFERENCES
You are about to change the arguments of the CALC_TEAM_AVG function. Which
dictionary view can you query to determine the names of the procedures and
functions that invoke the CALC_TEAM_AVG function?
Select an answer
*A. USER_DEPENDENCIES
B. USER_REFERENCES
C. USER_SOURCE
D. USER_PROC_DEPENDS
Given a function CALCTAX:
CREATE OR REPLACE FUNCTION calc tax (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?
Select an answer
A. You need to execute the command CALCTAX(1000); .
B. You need to execute the command EXECUTE FUNCTION calc tax;
*C. You need to create a SQL *Plus environment variable X and issue the
command :X := CALCTAX(1000);
D. You need to create a SQL *Plus environment variable X and issue the
command EXECUTE :X := CALCTAX;
E. You need to create a SQL *Plus environment variable X and issue the
command EXECUTE :X := CALCTAX(1000);
Which one of these operators does not have the same precedence as the others?
Select an answer
A. BETWEEN
*B. AND
C. LIKE
D. IS NULL
Which situation requires a before update statement level trigger on the table?
Select an answer
A. When you need to populate values of each updated row into another
table
B. When a trigger must fire for each row affected by the triggering
statement
*C. When you need to make sure that user making modifications to the
table has necessary privileges
D. When you need to store the information of the use who successfully
modified tables and in audit table

More Related Content

What's hot

Procedures/functions of rdbms
Procedures/functions of rdbmsProcedures/functions of rdbms
Procedures/functions of rdbms
jain.pralabh
 
Basic cursors in oracle
Basic cursors in oracleBasic cursors in oracle
Basic cursors in oracle
Suhel Firdus
 
Plsql
PlsqlPlsql
Procedure and Functions in pl/sql
Procedure and Functions in pl/sqlProcedure and Functions in pl/sql
Procedure and Functions in pl/sql
Ñirmal Tatiwal
 
Oracle PL/SQL Bulk binds
Oracle PL/SQL Bulk bindsOracle PL/SQL Bulk binds
Oracle PL/SQL Bulk binds
Scott Wesley
 
PLSQL Cursors
PLSQL CursorsPLSQL Cursors
PLSQL Cursors
spin_naresh
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
Nick Buytaert
 
Plsql
PlsqlPlsql
Function & procedure
Function & procedureFunction & procedure
Function & procedure
atishupadhyay
 
Programming in Oracle with PL/SQL
Programming in Oracle with PL/SQLProgramming in Oracle with PL/SQL
Programming in Oracle with PL/SQL
lubna19
 
Stored procedure
Stored procedureStored procedure
Pl sql guide
Pl sql guidePl sql guide
Pl sql guide
Vinay Kumar
 
4. plsql
4. plsql4. plsql
4. plsql
Amrit Kaur
 
3963066 pl-sql-notes-only
3963066 pl-sql-notes-only3963066 pl-sql-notes-only
3963066 pl-sql-notes-only
Ashwin Kumar
 
Plsql guide 2
Plsql guide 2Plsql guide 2
Plsql guide 2
Vinay Kumar
 
Sql Functions And Procedures
Sql Functions And ProceduresSql Functions And Procedures
Sql Functions And Procedures
DataminingTools Inc
 
Oracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuningOracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuning
Smitha Padmanabhan
 
Procedures andcursors
Procedures andcursorsProcedures andcursors
Procedures andcursors
LakshmiSamivel
 
PLSQL CURSOR
PLSQL CURSORPLSQL CURSOR
PLSQL CURSOR
Arun Sial
 
PLSQL tutorial...
PLSQL tutorial...PLSQL tutorial...
PLSQL tutorial...
JYOTI RANJAN PAL
 

What's hot (20)

Procedures/functions of rdbms
Procedures/functions of rdbmsProcedures/functions of rdbms
Procedures/functions of rdbms
 
Basic cursors in oracle
Basic cursors in oracleBasic cursors in oracle
Basic cursors in oracle
 
Plsql
PlsqlPlsql
Plsql
 
Procedure and Functions in pl/sql
Procedure and Functions in pl/sqlProcedure and Functions in pl/sql
Procedure and Functions in pl/sql
 
Oracle PL/SQL Bulk binds
Oracle PL/SQL Bulk bindsOracle PL/SQL Bulk binds
Oracle PL/SQL Bulk binds
 
PLSQL Cursors
PLSQL CursorsPLSQL Cursors
PLSQL Cursors
 
PL/SQL Fundamentals I
PL/SQL Fundamentals IPL/SQL Fundamentals I
PL/SQL Fundamentals I
 
Plsql
PlsqlPlsql
Plsql
 
Function & procedure
Function & procedureFunction & procedure
Function & procedure
 
Programming in Oracle with PL/SQL
Programming in Oracle with PL/SQLProgramming in Oracle with PL/SQL
Programming in Oracle with PL/SQL
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
Pl sql guide
Pl sql guidePl sql guide
Pl sql guide
 
4. plsql
4. plsql4. plsql
4. plsql
 
3963066 pl-sql-notes-only
3963066 pl-sql-notes-only3963066 pl-sql-notes-only
3963066 pl-sql-notes-only
 
Plsql guide 2
Plsql guide 2Plsql guide 2
Plsql guide 2
 
Sql Functions And Procedures
Sql Functions And ProceduresSql Functions And Procedures
Sql Functions And Procedures
 
Oracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuningOracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuning
 
Procedures andcursors
Procedures andcursorsProcedures andcursors
Procedures andcursors
 
PLSQL CURSOR
PLSQL CURSORPLSQL CURSOR
PLSQL CURSOR
 
PLSQL tutorial...
PLSQL tutorial...PLSQL tutorial...
PLSQL tutorial...
 

Viewers also liked

TRIGGERS Cliente - servidor
TRIGGERS Cliente - servidorTRIGGERS Cliente - servidor
TRIGGERS Cliente - servidor
JOSE ARMANDO M.C.
 
Presentacio Sql 1
Presentacio Sql 1Presentacio Sql 1
Presentacio Sql 1
Martink137
 
Disparadores Trigger En Sql Y My Sql
Disparadores Trigger En Sql Y My SqlDisparadores Trigger En Sql Y My Sql
Disparadores Trigger En Sql Y My Sql
yareli
 
Presentacion Sql 2
Presentacion Sql 2Presentacion Sql 2
Presentacion Sql 2
Martink137
 
Triggers o disparadores en MySQL
Triggers o disparadores en MySQL Triggers o disparadores en MySQL
Triggers o disparadores en MySQL
Jair Ospino Ardila
 
Procedimientos almacenados en MySQL
Procedimientos almacenados en MySQLProcedimientos almacenados en MySQL
Procedimientos almacenados en MySQL
Miguel Angel Rivera Robledo
 
Ejemplo de Trigger en Mysql
Ejemplo de Trigger en MysqlEjemplo de Trigger en Mysql
Programación MySQL-Ejercicios
Programación MySQL-EjerciciosProgramación MySQL-Ejercicios
Programación MySQL-Ejercicios
testgrupocomex
 
Ejercicios sql
Ejercicios sqlEjercicios sql
Ejercicios sql
Victor Morales
 
MANUAL COMPLETO DE SQL
MANUAL COMPLETO DE SQLMANUAL COMPLETO DE SQL
MANUAL COMPLETO DE SQL
Edgar Sandoval
 

Viewers also liked (10)

TRIGGERS Cliente - servidor
TRIGGERS Cliente - servidorTRIGGERS Cliente - servidor
TRIGGERS Cliente - servidor
 
Presentacio Sql 1
Presentacio Sql 1Presentacio Sql 1
Presentacio Sql 1
 
Disparadores Trigger En Sql Y My Sql
Disparadores Trigger En Sql Y My SqlDisparadores Trigger En Sql Y My Sql
Disparadores Trigger En Sql Y My Sql
 
Presentacion Sql 2
Presentacion Sql 2Presentacion Sql 2
Presentacion Sql 2
 
Triggers o disparadores en MySQL
Triggers o disparadores en MySQL Triggers o disparadores en MySQL
Triggers o disparadores en MySQL
 
Procedimientos almacenados en MySQL
Procedimientos almacenados en MySQLProcedimientos almacenados en MySQL
Procedimientos almacenados en MySQL
 
Ejemplo de Trigger en Mysql
Ejemplo de Trigger en MysqlEjemplo de Trigger en Mysql
Ejemplo de Trigger en Mysql
 
Programación MySQL-Ejercicios
Programación MySQL-EjerciciosProgramación MySQL-Ejercicios
Programación MySQL-Ejercicios
 
Ejercicios sql
Ejercicios sqlEjercicios sql
Ejercicios sql
 
MANUAL COMPLETO DE SQL
MANUAL COMPLETO DE SQLMANUAL COMPLETO DE SQL
MANUAL COMPLETO DE SQL
 

Similar to Plsql

Plsql pdf
Plsql pdfPlsql pdf
Plsql pdf
Jatin Srivastava
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
Shohan Ahmed
 
Advanced plsql mock_assessment
Advanced plsql mock_assessmentAdvanced plsql mock_assessment
Advanced plsql mock_assessment
Saurabh K. Gupta
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
Shohan Ahmed
 
SQL MCQ
SQL MCQSQL MCQ
Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09
Thuan Nguyen
 
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
RSathyaPriyaCSEKIOT
 
Html
HtmlHtml
cuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfcuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdf
YashwanthCse
 
Unix
UnixUnix
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
Dipta Saha
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
Sujata Regoti
 
1 z1 051
1 z1 0511 z1 051
1 z1 051
AHMED ENNAJI
 
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).docKality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
AnimutGeremew3
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
shubhra chauhan
 
Quiz1 tonghop
 Quiz1 tonghop Quiz1 tonghop
Quiz1 tonghop
Daewoo Han
 
Which is not a step in the problem
Which is not a step in the problemWhich is not a step in the problem
Which is not a step in the problem
kasguest
 
Which is not a step in the problem
Which is not a step in the problemWhich is not a step in the problem
Which is not a step in the problem
kasguest
 
C Programming Unit-2
C Programming Unit-2C Programming Unit-2
C Programming Unit-2
Vikram Nandini
 
Oracle: Procedures
Oracle: ProceduresOracle: Procedures
Oracle: Procedures
oracle content
 

Similar to Plsql (20)

Plsql pdf
Plsql pdfPlsql pdf
Plsql pdf
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Advanced plsql mock_assessment
Advanced plsql mock_assessmentAdvanced plsql mock_assessment
Advanced plsql mock_assessment
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
SQL MCQ
SQL MCQSQL MCQ
SQL MCQ
 
Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09
 
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
 
Html
HtmlHtml
Html
 
cuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfcuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdf
 
Unix
UnixUnix
Unix
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
 
1 z1 051
1 z1 0511 z1 051
1 z1 051
 
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).docKality CS Model_Exit_Exams_with_answer - Copy (2).doc
Kality CS Model_Exit_Exams_with_answer - Copy (2).doc
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
 
Quiz1 tonghop
 Quiz1 tonghop Quiz1 tonghop
Quiz1 tonghop
 
Which is not a step in the problem
Which is not a step in the problemWhich is not a step in the problem
Which is not a step in the problem
 
Which is not a step in the problem
Which is not a step in the problemWhich is not a step in the problem
Which is not a step in the problem
 
C Programming Unit-2
C Programming Unit-2C Programming Unit-2
C Programming Unit-2
 
Oracle: Procedures
Oracle: ProceduresOracle: Procedures
Oracle: Procedures
 

Recently uploaded

132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
Madan Karki
 
An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
IJECEIAES
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
bjmsejournal
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
gaafergoudaay7aga
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
bijceesjournal
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 

Recently uploaded (20)

132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
 
An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 

Plsql

  • 1. Which line number has error in the following program? CREATE OR REPLACE PROCEDURE p2 is Begin Insert into enp(empno,ename,sal) values(11,'John',1111); Drop table dept; Delete from salgrade; Rollback; End; Select an answer A. 2 B. 5 *C. 7 D. 4 The mechanisms that prevent destructive interaction between transactions accessing the same resource is called: Select an answer *A. Lock B. Transaction C. Interaction D. None of the options are correct The ________ statement is a data definition language statement and generates no rollback information. Select an answer A. ROLLBACK B. TRANSACT *C. TRUNCATE D. None of the options are correct Which of the statements must be used inside a PL/SQL block to remove data from a table? Select an answer A. DROP B. MERGE C. DROP *D. DELETE Which view displays indirect dependencies, indenting each dependency? Select an answer A. DEPTREE *B. IDEPTREE C. INDENT_TREE D. I_DEPT_TREE What is the scope of a local declaration? Select an answer
  • 2. A. Subprogram B. Session *C. Block D. Schema A database transaction ends with one of the following commands. Select an answer A. Exit command B. Stop command *C. Commit command D. None of the options are correct You need to create a trigger on the EMP table that monitors every row that is changed and places this information into the AUDIT_TABLE. Which type of trigger do you create? Select an answer A. Statement-level trigger on the EMP table B. For each row trigger on the EMP table C. Statement-level trigger on the AUDIT_TABLE table D. For each row statement level trigger on the EMP table *E. For each row trigger on the AUDIT_TABLE table You can control the logic of transactions by using the following statement/s. (Please select ALL that apply) Select an answer *A. COMMIT *B. SAVEPOINT *C. ROLLBACK D. None of the options are correct Which of the following is NOT VALID declaration? Select an answer A. Bool boolean; *B. NUM1, NUM2 number; C. deptname dept.dname%type; D. date1 date := sysdate; Find the ODD one out of the following. Select an answer A. OPEN B. CLOSE *C. INSERT D. FETCH Find the ODD one out of the following. Select an answer
  • 3. A. OPEN B. CLOSE C. INSERT D. FETCH Which three describes a stored procedure? (Please select ALL that apply) Select an answer A. A stored procedure is typically written in SQL *B. By default, a stored procedure executes with the privileges of its owner C. A stored procedure has three parts: the specification, the body, and the exception handler part *D. A stored procedure is stored in the database and can be shared by a number of programs *E. A stored procedure offers some advantages over a standalone SQL statement, such as programmable functionality and compiled code You need to create a DML trigger. Which five pieces need to be identified? (Please select ALL that apply) Select an answer *A. table *B. DML event *C. trigger body D. package body *E. trigger name *F. trigger timing Examine this code: CREATE OR REPLACE PACKAGE prod_pack IS g_tax_rate NUMBER := .08; END prod_pack; Which statement about this code is true? Select an answer A. This package specification can exist without a body B. This package body can exist without a specification C. This package body cannot exist without a specification *D. This package specification cannot exist without a body How can a PL/SQL block be executed? Select an answer A. By using a semi colon at the end B. By using a colon at the end C. By using a slash (/) at the end *D. By pressing "Enter"
  • 4. Question: 16 of 30 lt043993enQ0128 Which part of a database trigger determines the number of times the trigger body executes? Select an answer *A. TRIGGER TYPE B. TRIGGER BODY C. TRIGGER EVENT D. TRIGGER TIMING Examine this procedure: CREATE OR REPLACE PROCEDURE UPD_BAT_STAT (V_ID IN NUMBER DEFAULT 10, V_AB IN NUMBER DEFAULT 4) IS BEGIN UPDATE PLAYER_BAT_STAT SET AT_BATS = AT_BATS + V_AB WHERE PLAYER_ID = V_ID; COMMIT; END; Which two statements will successfully invoke this procedure in SQL *Plus? (Please select ALL that apply) Select an answer *A. EXECUTE UPD_BAT_STAT; *B. EXECUTE UPD_BAT_STAT(V_AB=>10, V_ID=>31); C. EXECUTE UPD_BAT_STAT(31, .FOUR., .TWO.); D. UPD_BAT_STAT(V_AB=>10, V_ID=>31); What is a condition predicate in a DML trigger? Select an answer A. A conditional predicate allows you to specify a WHEN-LOGGING-ON condition in the trigger body B. A conditional predicate means that you use the NEW and OLD qualifiers in the trigger body as a condition *C. A conditional predicate allows you to combine several DBM triggering events into one in the trigger body D. A conditional predicate allows you to specify a SHUTDOWN or STARTUP condition in the trigger body The ADD_PLAYER, UPD_PLAYER_STAT, and UPD_PITCHER_STAT procedures are grouped together in a package. A variable must be shared among only these procedures. Where should you declare this variable? Select an answer *A. In the package body B. In the data base triggers C. In the package specification D. In the procedures, declare section using the exact name in each
  • 5. What are the conditions when a record variable is assigned to +D135another record variable, the target variable is declared with a RECORD type, and the source variable is declared with %ROWTYPE? Select an answer A. An error is thrown *B. The assignment is successful only when their fields match in number and order, and corresponding fields have the same data type C. The assignment is successful as long as the fields in both source and target have the same datatype, even if they do not match in number and order D. The assignment is successful only when their fields match in number, and corresponding fields have the same data type. The order of the fields does not matter How can a user defined exception be raised? Select an answer *A. Using RAISE statement only B. Using RAISE statement or RAISE_APPLICATION_ERROR function C. Using INVOKE statement or RAISE statement D. Using RAISE statement or RAISE_APPLICATIOn_ERROR procedure Which of the following is not correct about an exception? Select an answer *A. Raised explicitly /automatically in response to an ORACLE_ERROR B. An exception will be raised when an error occurs in that block C. Process terminates after completion of error sequence D. A procedure of sequence of statements may be processed You have created a stored procedure DELETE_TEMP_TABLE that uses dynamic SQL to remove a table in your schema. You have granted the EXECUTE privilege to user A on this procedure. When user A executes the DELETE_TEMP_TABLE procedure, under whose privileges are the operations performed by default? Select an answer A. SYS privileges *B. Your privileges C. Public privileges D. User A.s privileges E. User A cannot execute your procedure that has dynamic SQL Examine this code: CREATE OR REPLACE PRODECURE add_dept (p_dept_name VARCHAR2 DEFAULT .placeholder ., p_location VARCHAR2 DEFAULT .Boston .) IS BEGIN INSERT INTO departments VALUES (dept_id_seq.NEXTVAL, p_dept_name, p_location); END add_dept; /
  • 6. Which three are valid calls to the add_dep procedure? (Please select ALL that apply) Select an answer *A. add_dept; *B. add_dept( .Accounting .); C. add_dept(, .New York .); *D. add_dept(p_location=> .New York .); Examine the trigger: CREATE OR REPLACE TRIGGER Emp_count AFTER DELETE ON Emp_tab FOR EACH ROW DELCARE n INTEGER; BEGIN SELECT COUNT(*) INTO n FROM Emp_tab; DMBS_OUTPUT.PUT_LINE ( . There are now . || a || . employees, .); END; This trigger results in an error after this SQL statement is entered: DELETE FROM Emp_tab WHERE Empno = 7499; How do you correct the error? Select an answer A. Change the trigger type to a BEFORE DELETE B. Take out the COUNT function because it is not allowed in a trigger C. Remove the DBMS_OUTPUT statement because it is not allowed in a trigger *D. Change the trigger to a statement-level trigger by removing FOR EACH ROW _____________ pragma is used to attach a user defined error name with predefined error number. Select an answer A. AUTONOMOUS TRANSACTON *B. EXCEPTION_INIT C. ERROR_INIT D. RESTRICT_REFERENCES You are about to change the arguments of the CALC_TEAM_AVG function. Which dictionary view can you query to determine the names of the procedures and functions that invoke the CALC_TEAM_AVG function? Select an answer *A. USER_DEPENDENCIES B. USER_REFERENCES C. USER_SOURCE D. USER_PROC_DEPENDS Given a function CALCTAX: CREATE OR REPLACE FUNCTION calc tax (sal NUMBER) RETURN
  • 7. 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? Select an answer A. You need to execute the command CALCTAX(1000); . B. You need to execute the command EXECUTE FUNCTION calc tax; *C. You need to create a SQL *Plus environment variable X and issue the command :X := CALCTAX(1000); D. You need to create a SQL *Plus environment variable X and issue the command EXECUTE :X := CALCTAX; E. You need to create a SQL *Plus environment variable X and issue the command EXECUTE :X := CALCTAX(1000); Which one of these operators does not have the same precedence as the others? Select an answer A. BETWEEN *B. AND C. LIKE D. IS NULL Which situation requires a before update statement level trigger on the table? Select an answer A. When you need to populate values of each updated row into another table B. When a trigger must fire for each row affected by the triggering statement *C. When you need to make sure that user making modifications to the table has necessary privileges D. When you need to store the information of the use who successfully modified tables and in audit table