QuestionQ287

VerifiedRestricting and Sorting Data

Review this statement:

SELECT student_id, gpa FROM student_grades WHERE gpa > &&value;  

You execute the statement once and, when prompted, enter a value of 2.0. A report is generated.

What occurs when you execute the statement a second time?

Explanation

In SQL*Plus, a double-ampersand substitution variable is stored when its initially undefined reference prompts for a value. Subsequent uses of that variable substitute the stored value without another prompt, so the statement runs again with gpa > 2.0 and produces the same result set unless the table data has changed.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!