Oracle Online Test Series 3, Oracle Mock Test, Oracle Online Exam
Oracle Online Test Series 3, Oracle Mock Test, Oracle Online Exam
Finish Quiz
0 of 30 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
Information
Oracle Online Test 3 , Free Oracle Quiz, Online Oracle, online Test Quiz 3. Oracle Online Test 3 Question and Answers 2019. Oracle online Test Quiz 3. Oracle Test 3 Free Mock Test 2019. Oracle Online Test 3 Question and Answers in PDF. The Oracle online mock test paper is free for all students. Oracle Online Test is very useful for exam preparation and getting for Rank. Oracle Online Test-3 Question and Answers in English. Oracle Online Test for topic via String Handling Mode. Here we are providing Oracle Online Test in English Now Test your self for “Oracle Online Test in English” Exam by using below quiz…
This paper has 30 questions.
Time allowed is 30 minutes.
The Oracle Online Test is Very helpful for all students. Now Scroll down below n click on “Start Quiz” or “Start Test” and Test yourself.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 30 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
Pos. | Name | Entered on | Points | Result |
---|---|---|---|---|
Table is loading | ||||
No data available | ||||
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- Answered
- Review
-
Question 1 of 30
1. Question
Which of the following is a predefined oracle exception(s)?
Correct
TIMEOUT_ON_RESOURCE is a predefined oracle exception. A time out occurs while Oracle is waiting for a resource.
Incorrect
TIMEOUT_ON_RESOURCE is a predefined oracle exception. A time out occurs while Oracle is waiting for a resource.
-
Question 2 of 30
2. Question
A Ref cursor can be passed from one procedure to another
Correct
The above statement is true. A ref cursor can be passed from one procedure to another. A ref cursor is a variable, defined as a cursor type, which will point to, or reference a cursor result. The advantage that a ref cursor has over a plain cursor that can be passed as a variable to a procedure or a function. A ref cursor can be assigned to another ref cursor variable. This is a powerful capability in that the cursor can be opened, passed to another block for processing, then returned to the original block to be closed. The cursor variable can also be returned by a function and assigned to another variable. A ref cursor variable is not a cursor, but a variable that points to a cursor. Before assigning a cursor variable, a cursor type must be defined.
Incorrect
The above statement is true. A ref cursor can be passed from one procedure to another. A ref cursor is a variable, defined as a cursor type, which will point to, or reference a cursor result. The advantage that a ref cursor has over a plain cursor that can be passed as a variable to a procedure or a function. A ref cursor can be assigned to another ref cursor variable. This is a powerful capability in that the cursor can be opened, passed to another block for processing, then returned to the original block to be closed. The cursor variable can also be returned by a function and assigned to another variable. A ref cursor variable is not a cursor, but a variable that points to a cursor. Before assigning a cursor variable, a cursor type must be defined.
-
Question 3 of 30
3. Question
_____________ can be declared by us for the queries that return more than one row
Correct
Explicit cursors can be declared by us for the queries that return more than one row. In explicit cursor, the cursor stores multiple records, only one record can be processed at a time, which is called as current row. When you fetch a row, the current row position moves to next row. Oracle provides some attributes known as Explicit Cursor Attributes to control the data processing while using cursors. We use these attributes to avoid errors while accessing cursors through OPEN, FETCH and CLOSE Statements. An explicit cursor is defined in the declaration section of the PL/SQL Block. It is created on a SELECT Statement which returns more than one row.
Incorrect
Explicit cursors can be declared by us for the queries that return more than one row. In explicit cursor, the cursor stores multiple records, only one record can be processed at a time, which is called as current row. When you fetch a row, the current row position moves to next row. Oracle provides some attributes known as Explicit Cursor Attributes to control the data processing while using cursors. We use these attributes to avoid errors while accessing cursors through OPEN, FETCH and CLOSE Statements. An explicit cursor is defined in the declaration section of the PL/SQL Block. It is created on a SELECT Statement which returns more than one row.
-
Question 4 of 30
4. Question
What is the use of Translate Function in Oracle?
Correct
Translate function performs a character wise replacement of a string. This function replaces a sequence of characters in a string with another set of characters. However, it replaces a single character at a time. This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion.
Incorrect
Translate function performs a character wise replacement of a string. This function replaces a sequence of characters in a string with another set of characters. However, it replaces a single character at a time. This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion.
-
Question 5 of 30
5. Question
_____________ has fixed upper-bound size that has to be specified while it is declared
Correct
Varray has fixed upper-bound size that has to be specified while it is declared. Varray is varying array type that is typically used when the number of instances to be stored is small. It has a set of data elements and all are of the same data type. The size of Varray determines the number of elements. Varrays are one-dimensional, arrays. The maximum length is defined in the declaration itself. These can be only used when you know in advance about the maximum number of items to be stored.
Incorrect
Varray has fixed upper-bound size that has to be specified while it is declared. Varray is varying array type that is typically used when the number of instances to be stored is small. It has a set of data elements and all are of the same data type. The size of Varray determines the number of elements. Varrays are one-dimensional, arrays. The maximum length is defined in the declaration itself. These can be only used when you know in advance about the maximum number of items to be stored.
-
Question 6 of 30
6. Question
Which of the following statments is false for incremental backup?
Correct
Incremental backup stores all files changed since the last FULL, DIFFERENTIAL OR INCREMENTAL backup. The advantage of an incremental backup is that it takes the least time to finish. The disadvantage is that during a restore operation, each increment is processed and this could result in a lengthy restore job. Incremental backup provides a faster method of backing up data than repeatedly running full backups. During an incremental backup, only files changed since the most recent backup are included. That is where it gets its name: each backup is an increment for a previous backup.
Incorrect
Incremental backup stores all files changed since the last FULL, DIFFERENTIAL OR INCREMENTAL backup. The advantage of an incremental backup is that it takes the least time to finish. The disadvantage is that during a restore operation, each increment is processed and this could result in a lengthy restore job. Incremental backup provides a faster method of backing up data than repeatedly running full backups. During an incremental backup, only files changed since the most recent backup are included. That is where it gets its name: each backup is an increment for a previous backup.
-
Question 7 of 30
7. Question
Which of the following are different types of record group?
Correct
A record group is an oracle forms data structure that has a column/row framework similar to a database table. There are three types of record groups:
1. Query record groups
2. Non-query record groups
3. Static record groups.1. Query record group: A query record group is a record group that has an associated SELECT statement. Query record groups can be created and modified at design time or at runtime.
2. Non-query record group: A non-query record group is a group that does not have an associated query. Non-query record groups can be created and modified only at runtime.
3. Static record group: A static record group is not associated with a query. Static record groups can be created and modified only at design time.
Incorrect
A record group is an oracle forms data structure that has a column/row framework similar to a database table. There are three types of record groups:
1. Query record groups
2. Non-query record groups
3. Static record groups.1. Query record group: A query record group is a record group that has an associated SELECT statement. Query record groups can be created and modified at design time or at runtime.
2. Non-query record group: A non-query record group is a group that does not have an associated query. Non-query record groups can be created and modified only at runtime.
3. Static record group: A static record group is not associated with a query. Static record groups can be created and modified only at design time.
-
Question 8 of 30
8. Question
Privileges of a ROLE in oracle can be dynamically changed
Correct
The above statement is true. Privileges of a ROLE in oracle can be dynamically changed. A user privilege is a right to execute a particular type of SQL statement, or a right to access another user’s object. The types of privileges are defined by Oracle. Roles, on the other hand, are created by users (usually administrators) and are used to group together privileges or other roles. They are a means of facilitating the granting of multiple privileges or roles to users.
Incorrect
The above statement is true. Privileges of a ROLE in oracle can be dynamically changed. A user privilege is a right to execute a particular type of SQL statement, or a right to access another user’s object. The types of privileges are defined by Oracle. Roles, on the other hand, are created by users (usually administrators) and are used to group together privileges or other roles. They are a means of facilitating the granting of multiple privileges or roles to users.
-
Question 9 of 30
9. Question
What is the difference between CYCLE/NO CYCLE in a oracle Sequence?
Correct
When a sequence is created using CYCLE option, values for the column are regenerated from MINVALUE once MAXVALUE is reached. Certainly, this option should not be used if the Sequence is created for a primary key column.
When a sequence is created using NO CYCLE option, values for the column are NOT regenerated from MINVALUE once MAXVALUE is reached.
Incorrect
When a sequence is created using CYCLE option, values for the column are regenerated from MINVALUE once MAXVALUE is reached. Certainly, this option should not be used if the Sequence is created for a primary key column.
When a sequence is created using NO CYCLE option, values for the column are NOT regenerated from MINVALUE once MAXVALUE is reached.
-
Question 10 of 30
10. Question
____________ exception directs the complier to add the user defined error message to the oracle error number
Correct
The pragma EXCEPTION_INIT directs the compiler to add the user defined error message to the Oracle error number. The pragma EXCEPTION_INIT associates an exception name with an Oracle error number. You can intercept any ORA- error and write a specific handler for it instead of using the others handler. Pragma is a keyword directive to execute proceed at compile time. The pragma EXCEPTION_INIT function takes two arguments: 1. exception_name and 2. error_number
You can define pragrma EXCEPTION_INIT in DECLARE BLOCK on your program: PRAGMA EXCEPTION_INIT(exception_name, -error_number);
The exception_name and error_number define on yourself, where exception_name is a character string up to 2048 bytes supports and error_number is a negative integer range from -20000 to -20999.
A pragma is a compiler directive that is processed at compile time, not at run time.
Incorrect
The pragma EXCEPTION_INIT directs the compiler to add the user defined error message to the Oracle error number. The pragma EXCEPTION_INIT associates an exception name with an Oracle error number. You can intercept any ORA- error and write a specific handler for it instead of using the others handler. Pragma is a keyword directive to execute proceed at compile time. The pragma EXCEPTION_INIT function takes two arguments: 1. exception_name and 2. error_number
You can define pragrma EXCEPTION_INIT in DECLARE BLOCK on your program: PRAGMA EXCEPTION_INIT(exception_name, -error_number);
The exception_name and error_number define on yourself, where exception_name is a character string up to 2048 bytes supports and error_number is a negative integer range from -20000 to -20999.
A pragma is a compiler directive that is processed at compile time, not at run time.
-
Question 11 of 30
11. Question
OWA (Oracle Web Agent) or MOD_PLSQL is an Apache (Web Server) extension module that enables you to create _______________ from PL/SQL packages and stored procedures.
Correct
MOD_PLSQL is an Apache (Web Server) extension module that allows one to create dynamic web pages from PL/SQL packages and stored procedures. It is ideal for developing fast and flexible applications that can run on the Internet or an Intranet. MOD_PLSQL was formerly called the Oracle PL/SQL Cartridge and OWA (Oracle Web Agent).
Incorrect
MOD_PLSQL is an Apache (Web Server) extension module that allows one to create dynamic web pages from PL/SQL packages and stored procedures. It is ideal for developing fast and flexible applications that can run on the Internet or an Intranet. MOD_PLSQL was formerly called the Oracle PL/SQL Cartridge and OWA (Oracle Web Agent).
-
Question 12 of 30
12. Question
Which privilege is used to allow creating or altering a system trigger on the database?
Correct
To create a trigger on a pluggable database (PDB), you must be connected to that PDB and have the ADMINISTER DATABASE TRIGGER system privilege. ADMINISTER DATABASE TRIGGER is used to allow creating or altering a system trigger on the database.
Incorrect
To create a trigger on a pluggable database (PDB), you must be connected to that PDB and have the ADMINISTER DATABASE TRIGGER system privilege. ADMINISTER DATABASE TRIGGER is used to allow creating or altering a system trigger on the database.
-
Question 13 of 30
13. Question
Once trigger is created its source code is stored in which types of data dictionary view?
Correct
USER_TRIGGERS describes the triggers owned by the current user. Its columns (except for OWNER) are the same as those in ALL_TRIGGERS.
Incorrect
USER_TRIGGERS describes the triggers owned by the current user. Its columns (except for OWNER) are the same as those in ALL_TRIGGERS.
-
Question 14 of 30
14. Question
____________________ is the process of copying the schema objects and data from a source third-party (non-Oracle) database to an Oracle database.
Correct
Migration is the process of copying the schema objects and data from a source third-party (non-Oracle) database, such as MySQL, Microsoft SQL Server, Sybase Adaptive Server, Microsoft Access, or IBM DB2 (UDB), to an Oracle database. You can perform the migration in an efficient, largely automated way.
Incorrect
Migration is the process of copying the schema objects and data from a source third-party (non-Oracle) database, such as MySQL, Microsoft SQL Server, Sybase Adaptive Server, Microsoft Access, or IBM DB2 (UDB), to an Oracle database. You can perform the migration in an efficient, largely automated way.
-
Question 15 of 30
15. Question
On windows systems where SQL Developer stores user-related information?
Correct
SQL Developer stores user-related information in several places, with the specific location depending on the operating system and certain environment specifications. User-related information includes user-defined reports, user-defined snippets, SQL Worksheet history, code templates, and SQL Developer user preferences. In most cases, your user-related information is stored outside the SQL Developer installation directory hierarchy, so that it is preserved if you delete that directory and install a new version. The user-related information is stored in or under the IDE_USER_DIR environment variable location.
Incorrect
SQL Developer stores user-related information in several places, with the specific location depending on the operating system and certain environment specifications. User-related information includes user-defined reports, user-defined snippets, SQL Worksheet history, code templates, and SQL Developer user preferences. In most cases, your user-related information is stored outside the SQL Developer installation directory hierarchy, so that it is preserved if you delete that directory and install a new version. The user-related information is stored in or under the IDE_USER_DIR environment variable location.
-
Question 16 of 30
16. Question
Which object is included in schema object while it is created and manipulates with SQL?
Correct
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include the following types of objects:
– Clusters
– Database links
– Database triggers
– Dimensions
– External procedure libraries
– Indexes and index types
– Java classes, Java resources, and Java sources
– Materialized views and materialized view logs
– Object tables, object types, and object views
– Operators
– Sequences
– Stored functions, procedures, and packages
– Synonyms
– Tables and index-organized tables
– ViewsIncorrect
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include the following types of objects:
– Clusters
– Database links
– Database triggers
– Dimensions
– External procedure libraries
– Indexes and index types
– Java classes, Java resources, and Java sources
– Materialized views and materialized view logs
– Object tables, object types, and object views
– Operators
– Sequences
– Stored functions, procedures, and packages
– Synonyms
– Tables and index-organized tables
– Views -
Question 17 of 30
17. Question
Which types of object is stored in database and can be created and manipulated with SQL but not contained in schema?
Correct
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Other types of objects are also stored in the database and can be created and manipulated with SQL but are not contained in a schema:
– Contexts
– Directories
– Profiles
– Roles
– Tablespaces
– Users
– Rollback segments
Schema objects are logical data storage structures. Schema objects do not have a one-to-one correspondence to physical files on disk that store their information. However, Oracle stores a schema object logically within a tablespace of the database. The data of each object is physically contained in one or more of the tablespace’s datafiles. For some objects, such as tables, indexes, and clusters, you can specify how much disk space Oracle allocates for the object within the tablespace’s datafiles. There is no relationship between schemas and tablespaces: a tablespace can contain objects from different schemas, and the objects for a schema can be contained in different tablespaces.Incorrect
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Other types of objects are also stored in the database and can be created and manipulated with SQL but are not contained in a schema:
– Contexts
– Directories
– Profiles
– Roles
– Tablespaces
– Users
– Rollback segments
Schema objects are logical data storage structures. Schema objects do not have a one-to-one correspondence to physical files on disk that store their information. However, Oracle stores a schema object logically within a tablespace of the database. The data of each object is physically contained in one or more of the tablespace’s datafiles. For some objects, such as tables, indexes, and clusters, you can specify how much disk space Oracle allocates for the object within the tablespace’s datafiles. There is no relationship between schemas and tablespaces: a tablespace can contain objects from different schemas, and the objects for a schema can be contained in different tablespaces. -
Question 18 of 30
18. Question
Oracle also provides support for ________________ and __________________ specific to an application or cartridge.
Correct
Oracle also provides support for function-based indexes and domain indexes specific to an application or cartridge. Domain indexes are appropriate for special-purpose applications implemented using data cartridges. The domain index helps to manipulate complex data, such as spatial, time-series, audio, or video data. A function-based index is an index built on an expression. It extends your indexing capabilities beyond indexing on a column. A function-based index increases the variety of ways in which you can access data.
Incorrect
Oracle also provides support for function-based indexes and domain indexes specific to an application or cartridge. Domain indexes are appropriate for special-purpose applications implemented using data cartridges. The domain index helps to manipulate complex data, such as spatial, time-series, audio, or video data. A function-based index is an index built on an expression. It extends your indexing capabilities beyond indexing on a column. A function-based index increases the variety of ways in which you can access data.
-
Question 19 of 30
19. Question
When Sensitive information travels over enterprise networks and the Internet and stored in database can be protected by ___________________
Correct
Sensitive information is stored in your database or travels over enterprise networks and the Internet can be protected by encryption algorithms. An encryption algorithm transforms information into a form that cannot be deciphered without a decryption key.
Incorrect
Sensitive information is stored in your database or travels over enterprise networks and the Internet can be protected by encryption algorithms. An encryption algorithm transforms information into a form that cannot be deciphered without a decryption key.
-
Question 20 of 30
20. Question
How to pass an object to an external procedure when you define the object type?
Correct
Incorrect
-
Question 21 of 30
21. Question
When there is more than one external agent running or configured at that time which clause allows run-time identification of the external agent program?
Correct
Incorrect
-
Question 22 of 30
22. Question
Which PL/SQL function uses java libraries to impose a limit on method definitions?
Correct
PL/SQL wrapper functions that use Java libraries impose a limit on method definitions. All Java class methods accessed by PL/SQL wrapper functions must be static. Therefore, Java libraries that support PL/SQL wrapper functions are not thread safe.
Incorrect
PL/SQL wrapper functions that use Java libraries impose a limit on method definitions. All Java class methods accessed by PL/SQL wrapper functions must be static. Therefore, Java libraries that support PL/SQL wrapper functions are not thread safe.
-
Question 23 of 30
23. Question
Oracle Advanced Security supports Triple-DES encryption, which encrypts message data with three passes of the _____________________
Correct
Oracle Advanced Security supports Triple-DES encryption (3DES), which encrypts message data with three passes of the DES algorithm. 3DES provides a high degree of message security, but with a performance penalty. The magnitude of the performance penalty depends on the speed of the processor performing the encryption. 3DES typically takes three times as long to encrypt a data block when compared to the standard DES algorithm.
Incorrect
Oracle Advanced Security supports Triple-DES encryption (3DES), which encrypts message data with three passes of the DES algorithm. 3DES provides a high degree of message security, but with a performance penalty. The magnitude of the performance penalty depends on the speed of the processor performing the encryption. 3DES typically takes three times as long to encrypt a data block when compared to the standard DES algorithm.
-
Question 24 of 30
24. Question
Advanced Encryption Standard (AES) is approved by NIST in Federal Information Processing Standards (FIPS) Publication and is a new cryptographic algorithm standard developed to replace ____________________
Correct
The Advanced Encryption Standard (AES) [AES] was developed to replace DES [DES]. The AES Federal Information Processing Standard (FIPS) Publication specifies a cryptographic algorithm for use by U.S. Government organizations. However, the AES will also be widely used by organizations, institutions, and individuals outside of the U.S. Government. AES is a subset of the Rijndael cipher[5] developed by two Belgian cryptographers, Joan Daemen and Vincent Rijmen, who submitted a proposal to NIST during the AES selection process.[7] Rijndael is a family of ciphers with different key and block sizes.
Incorrect
The Advanced Encryption Standard (AES) [AES] was developed to replace DES [DES]. The AES Federal Information Processing Standard (FIPS) Publication specifies a cryptographic algorithm for use by U.S. Government organizations. However, the AES will also be widely used by organizations, institutions, and individuals outside of the U.S. Government. AES is a subset of the Rijndael cipher[5] developed by two Belgian cryptographers, Joan Daemen and Vincent Rijmen, who submitted a proposal to NIST during the AES selection process.[7] Rijndael is a family of ciphers with different key and block sizes.
-
Question 25 of 30
25. Question
To ensure the reliability of data packets during transmission across a network __________________ algorithms add little overhead and protect against the data modification, deleted packets, and replay attacks.
Correct
Oracle Advanced Security ensures data integrity with sequenced, cryptographic checksums. To ensure that data has not been modified, deleted, or replayed during transmission, Oracle Advanced Security optionally generates a cryptographically secure message digest–through cryptographic checksums using the MD5 algorithm–and includes it with each packet sent across the network. Alternatively, Oracle Advanced Security can use SHA-1 (with SSL). Data integrity algorithms add little overhead, and protect against data modification attacks, deleted packets, and replay attacks.
Incorrect
Oracle Advanced Security ensures data integrity with sequenced, cryptographic checksums. To ensure that data has not been modified, deleted, or replayed during transmission, Oracle Advanced Security optionally generates a cryptographically secure message digest–through cryptographic checksums using the MD5 algorithm–and includes it with each packet sent across the network. Alternatively, Oracle Advanced Security can use SHA-1 (with SSL). Data integrity algorithms add little overhead, and protect against data modification attacks, deleted packets, and replay attacks.
-
Question 26 of 30
26. Question
Which centralized authentication is beneficial to users to access multiple accounts and applications with a single password?
Correct
Single Sign-On (SSO) has become an over-loaded term for many developers. It’s used, sometimes inaccurately, to refer to any tool that simplifies login for the end-user. But SSO has a very specific technical definition, and the confusion increasingly makes it difficult for developers to find the right tool for the job.
Incorrect
Single Sign-On (SSO) has become an over-loaded term for many developers. It’s used, sometimes inaccurately, to refer to any tool that simplifies login for the end-user. But SSO has a very specific technical definition, and the confusion increasingly makes it difficult for developers to find the right tool for the job.
-
Question 27 of 30
27. Question
Secure Sockets Layer (SSL) is a standard protocol for securing network connections, which provides authentication, data __________________ and data integrity.
Correct
Secure Sockets Layer (SSL) is an industry standard protocol originally designed by Netscape Communications Corporation for securing network connections. SSL uses RSA public key cryptography in conjunction with symmetric key cryptography to provide authentication, encryption, and data integrity.
Incorrect
Secure Sockets Layer (SSL) is an industry standard protocol originally designed by Netscape Communications Corporation for securing network connections. SSL uses RSA public key cryptography in conjunction with symmetric key cryptography to provide authentication, encryption, and data integrity.
-
Question 28 of 30
28. Question
Native dynamic SQL processes most dynamic SQL statements with the _____________________ statement.
Correct
To process most dynamic SQL statements, you use the EXECUTE IMMEDIATE statement. To process a multi-row query (SELECT statement), you use the OPEN-FOR, FETCH, and CLOSE statements. The EXECUTE IMMEDIATE statement executes a dynamic SQL statement or anonymous PL/SQL block. You can use it to issue SQL statements that cannot be represented directly in PL/SQL, or to build up statements where you do not know all the table names, WHERE clauses, and so on in advance.
Incorrect
To process most dynamic SQL statements, you use the EXECUTE IMMEDIATE statement. To process a multi-row query (SELECT statement), you use the OPEN-FOR, FETCH, and CLOSE statements. The EXECUTE IMMEDIATE statement executes a dynamic SQL statement or anonymous PL/SQL block. You can use it to issue SQL statements that cannot be represented directly in PL/SQL, or to build up statements where you do not know all the table names, WHERE clauses, and so on in advance.
-
Question 29 of 30
29. Question
Which command is used to execute a dynamically build Transact-SQL statements?
Correct
The sp_executesql command is used to execute a dynamically build Transact-SQL statements. The sp_executesql has the same behavior as EXECUTE with regard to batches, the scope of names, and database context. The Transact-SQL statement or batch in the sp_executesql @stmt parameter is not compiled until the sp_executesql statement is executed.
Incorrect
The sp_executesql command is used to execute a dynamically build Transact-SQL statements. The sp_executesql has the same behavior as EXECUTE with regard to batches, the scope of names, and database context. The Transact-SQL statement or batch in the sp_executesql @stmt parameter is not compiled until the sp_executesql statement is executed.
-
Question 30 of 30
30. Question
Which statement is used to associate a cursor variable with the dynamic SQL statement?
Correct
The OPEN FOR statement is used to associate a cursor variable with the dynamic SQL statement. The OPEN-FOR statement executes the SELECT statement associated with a cursor variable. It allocates database resources to process the statement, identifies the result set (the rows that meet the conditions), and positions the cursor variable before the first row in the result set. Use an OPEN FOR statement to associate a cursor variable with the dynamic SQL statement. In the USING clause of the OPEN FOR statement, specify a bind variable for each placeholder in the dynamic SQL statement. The USING clause cannot contain the literal NULL. To work around this restriction, use an uninitialized variable where you want to use NULL.
Incorrect
The OPEN FOR statement is used to associate a cursor variable with the dynamic SQL statement. The OPEN-FOR statement executes the SELECT statement associated with a cursor variable. It allocates database resources to process the statement, identifies the result set (the rows that meet the conditions), and positions the cursor variable before the first row in the result set. Use an OPEN FOR statement to associate a cursor variable with the dynamic SQL statement. In the USING clause of the OPEN FOR statement, specify a bind variable for each placeholder in the dynamic SQL statement. The USING clause cannot contain the literal NULL. To work around this restriction, use an uninitialized variable where you want to use NULL.