VF=>user  ID=>     Login Feedback FAQ Blog

Quizzes gives you access to all quizzes taken in the past. The Resources tab offers searchable access to many topics in Oracle documentation, to popular Ask Tom threads, and to fascinating blog posts from around the world. Visit Commentary to search across all quiz discussions.


Filter Quizzes


View
Quiz
Played InFeature / Summary / AuthorEnded
OnDescending
CommentaryPct Correct
Featured

Native Dynamic SQL: EXECUTE IMMEDIATE

If you need to create a table inside a PL/SQL block, you must use dynamic SQL (EXECUTE IMMEDIATE, or another dynamic mechanism) - and then any other references to that table in the block must also be dynamic.

Author: Steven Feuerstein [9086-2650641]
2017-09-08 FridayNo Comments
Last: No Comments
-
PL/SQL Challenge

Dynamic SQL: When You Need Dynamic SQL

It's very easy to write static SQL in PL/SQL program units (one of the great joys of working with this database programming language). It's also quite easy to implement dynamic SQL requirements in PL/SQL. But that doesn't mean you should. The bottom line regarding dynamic SQL is: Construct and execute SQL at runtime only when you have to.

Author: Steven Feuerstein [26366-2645748]
2017-09-01 FridayNo Comments
Last: No Comments
-
Featured

Dynamic SQL: Dynamic PL/SQL

If you need to construct the name of your subprogram to be executed at runtime, you can use EXECUTE IMMEDIATE or DBMS_SQL.EXECUTE to get the job done. Remember, however, that you must construct a valid anonymous block.

Author: Steven Feuerstein [7356-2306561]
2017-05-12 FridayNo Comments
Last: No Comments
-
Featured

Validation Checks to Guard Against SQL Injection: DBMS_ASSERT.SIMPLE_SQL_NAME

Use DBMS_ASSERT.SIMPLE_SQL_NAME to help avoid SQL injection through the provision of the names of database objects, such as table and view names.

Author: Steven Feuerstein [5510-2202427]
2017-04-21 FridayNo Comments
Last: No Comments
-
PL/SQL Challenge

Executing DDL statements in PL/SQL blocks: Implicit commit when executing DDL

If when executing a DDL statement (inside or outside of PL/SQL), a commit is issued before the statement is parsed and executed - but only if the statement is syntactically valid. If there is a syntax error, no commit is performed. If the statement fails for semantic reasons (e.g., you try to create table named "X", but there is already a table with that name), the prior commit does occur.

Author: Steven Feuerstein [23407-2173634]
2017-04-07 FridayNo Comments
Last: No Comments
-
PL/SQL Challenge Championship

Dynamic PL/SQL: Binding variables to receive data from a dynamic PL/SQL block

When executing a dynamic SQL statement inside a dynamic PL/SQL block, think through carefully where you put your placeholders.

Author: Steven Feuerstein [22306-2081206]
2017-03-23 ThursdayNo New Comments

Last: 2017-03-24 14:49:38
-
Featured

Dynamic SQL: Dynamic PL/SQL

To execute a dynamically-constructed PL/SQL, you can use EXECUTE IMMEDIATE or DBMS_SQL, but the string that you construct for dynamic execution must be a valid anonymous PL/SQL block.

Author: Steven Feuerstein [6595-2092004]
2017-02-24 FridayNo New Comments
Objections: REJECTED
Last: 2012-08-12 18:48:52
-
PL/SQL Challenge

Executing DDL statements in PL/SQL blocks: EXECUTE IMMEDIATE to execute DDL statements

The "CREATE TYPE" statement to create a schema-level type is an example of a DDL statement. You can use EXECUTE IMMEDIATE to execute a DDL statement inside a PL/SQL block. With DDL statements, you cannot bind a variable into a placeholder. Neither can you include an INTO clause to get information back from the DDL statement. You simply execute a string and, if that string is a valid DDL statement, no error will be raised.

Author: Steven Feuerstein [22386-2092001]
2017-02-24 FridayNo New Comments
Objections: REJECTED
Last: 2017-02-27 17:24:32
-
PL/SQL Challenge

Executing DDL statements with EXECUTE_IMMEDIATE: Transaction impact of DDL execution

When you parse (and execute) a DDL statement in PL/SQL via EXECUTE IMMEDIATE or DBMS_SQL.PARSE, the PL/SQL engine performs a commit both before and after the statement is executed.

Author: Steven Feuerstein [18886-1815528]
2016-09-30 FridayNo Comments
Last: No Comments
-
PL/SQL Challenge

Dynamic SQL: Avoiding SQL Injection in PL/SQL

SQL injection is the exploitation of a poor design or bug in dynamic SQL (and dynamic PL/SQL blocks) that allows an attacker to introduce (or "inject") code into a computer program to change the course of execution from the normal or expected path.

Author: Steven Feuerstein [16001-1554972]
2016-04-22 FridayNo Comments
Last: No Comments
-
PL/SQL Challenge

Dynamic SQL: Native Dynamic SQL

When you need to fetch rows from a dynamically-constructed SELECT, you can use EXECUTE IMMEDIATE or OPEN FOR, but if you are fetching a very large number of rows, OPEN FOR with BULK COLLECT will allow you to use the LIMIT clause and avoid PGA memory errors.

Author: Steven Feuerstein [15841-1543798]
2016-04-15 FridayNo New Comments

Last: 2016-04-18 12:03:43
-
Quick Quiz

Oracle PL/SQL: Dynamic SQL

Dynamic SQL statements must not end in a semi-colon. Dynamic PL/SQL statements must end in a semi-colon.

Author: Steven Feuerstein [15761-1533096]
2016-04-08 FridayNo New Comments
Objections: ACCEPTED
Last: 2016-04-04 11:51:42
-
Featured

Dynamic PL/SQL: Binding variables to receive data from a dynamic PL/SQL block

When executing dynamic PL/SQL blocks, if you need to retrieve the value of an expression from that block, you must specify the OUT or IN OUT mode for the corresponding bind variable.

Author: Steven Feuerstein [474-1334295]
2015-12-04 FridayNo Comments
Last: No Comments
-
PL/SQL Challenge

EXECUTE IMMEDIATE: The USING clause of EXECUTE IMMEDIATE

When you use EXECUTE IMMEDIATE to run dynamic SQL (as opposed to dynamic PL/SQL block execution), it associates values in the USING clause positionally, regardless of the name of the placeholder used.

Author: Steven Feuerstein [13342-1313897]
2015-11-20 FridayNo New Comments

Last: 2015-11-24 20:08:12
-
Featured

Oracle PL/SQL: Dynamic SQL

When fetching a fixed number of columns (that is, known at compile time) from a dynamically-constructed query, you can use EXECUTE IMMEDIATE, OPEN FOR or DBMS_SQL. The first approach, native dynamic SQL, is usually the simplest. 

Author: Steven Feuerstein [10646-1240444]
2015-09-25 FridayNo Comments
Last: No Comments
-
  • 1 - 15
 
About Oracle | | Terms of Use | Your Privacy Rights | Copyright 2010-2017, Oracle Corporation