which substitution variables are you prompted for the input?

You execute the following commands:

For which substitution variables are you prompted for the input?

You execute the following commands:

For which substitution variables are you prompted for the input?

A.
None, because no input required

B.
Both the substitution variables ‘hiredate’ and ‘mgr_id\

C.
Only ‘hiredate’

D.
Only ‘mgr_id’

Explanation:



Leave a Reply 8

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


Anna

Anna

SQL> define hiredate = ’01-APR-2011′
SQL> select employee_id, first_name, salary
2 from employees
3 where hire_date > ‘&hiredate’
4 and manager_id > &mgr_id;
old 3: where hire_date > ‘&hiredate’
new 3: where hire_date > ’01-APR-2011′
Enter value for mgr_id: 13
old 4: and manager_id > &mgr_id
new 4: and manager_id > 13

no rows selected

the correct response is D

Lee

Lee

Correct Ans is D
Verified !

deivsto

deivsto

SQL> define hiredate = ‘2008-01-04’
SQL> select employee_id, first_name, salary from employees where hire_date > ‘&hiredate’ and manager_id > &mgr_id;
Enter value for mgr_id: 50
old 1: select employee_id, first_name, salary from employees where hire_date > ‘&hiredate’ and manager_id > &mgr_id
new 1: select employee_id, first_name, salary from employees where hire_date > ‘2008-01-04’ and manager_id > 50

EMPLOYEE_ID FIRST_NAME SALARY
———– ——————– ———-
128 Steven 2200
136 Hazel 2200
149 Eleni 10500
164 Mattea 7200
165 David 6800
166 Sundar 6400
167 Amit 6200
173 Sundita 6100
183 Girard 2800
199 Douglas 2600

10 rows selected.

Just one more example. D is correct!

Marcelo

Marcelo

SQL> define hiredate=’14/06/05′;
SQL> select last_name, email, hire_date, manager_id from employees where hire_date=’&hiredate’ and manager_id = ‘&mng_id’;
Informe o valor para mng_id: 122

LAST_NAME EMAIL HIRE_DAT MANAGER_ID
========================= ========================= ======== ==========
Chung KCHUNG 14/06/05 122

1 linha selecionada.

REALLY : ANSWER IS D

Tram

Tram

If there is no DEFINE statement for hiredate varible, would it prompt both inputs? And if so, do you need to enter the date in quote ‘ ‘? Thanks

oualid

oualid

Yes, if you did not DEFINE the variable for Hiredate it prompts both

Jenny

Jenny

I think the answer is D.