Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

IBM C2090-545 Exam - Cheat-Test.com

Free C2090-545 Sample Questions:

Q: 1
A developer needs to create a user-defined function that will return a list of employees who work in a particular department. Which statement will successfully create a function that meets this objective?
A. CREATE FUNCTIONdept_employees (deptno CHAR(3))
RETURNS TABLE
LANGUAGE SQL
READS SQL DATA
RETURN
SELECT empno, lastname AS l_name, firstnme AS f_name
FROM employee
WHERE employee.workdept = dept_employees.deptno
B. CREATE FUNCTIONdept_employees (deptno CHAR(3))
RETURNS TABLE
DYNAMIC RESULT SETS 1
LANGUAGE SQL
READS SQL DATA
DECLARE emp_info CURSOR WITH RETURN FOR
SELECT empno, lastname AS l_name, firstnme AS f_name
FROM employee
WHERE employee.workdept = dept_employees.deptno
OPEN emp_info;
RETURN
C. CREATE FUNCTIONdept_employees (deptno CHAR(3))
RETURNS TABLE (empno CHAR(6),
l_nameVARCHAR(15),
f_nameVARCHAR(12))
LANGUAGE SQL
READS SQL DATA
RETURN
SELECT empno, lastname AS l_name, firstnme AS f_name
FROM employee
WHERE employee.workdept = dept_employees.deptno
D. CREATE FUNCTIONdept_employees (deptno CHAR(3))
RETURNS TABLE (empno CHAR(6),
l_nameVARCHAR(15),
f_nameVARCHAR(12))
DYNAMIC RESULT SETS 1
LANGUAGE SQL
READS SQL DATA
DECLARE emp_info CURSOR WITH RETURN FOR
SELECT empno, lastname AS l_name, firstnme AS f_name
FROM employee
WHERE employee.workdept = dept_employees.deptno
OPEN emp_info;
RETURN
Answer: C

Q: 2
Which statement correctly describes characteristics of external functions?
A. External functions cannot return tables.
B. All cursors opened within an external function should stay open until the database isquiesced.
C. Scratchpads can be used to allocate dynamic memory required for multiple function invocations.
D. Transactions can be terminated within external functions.
Answer: C

Q: 3
Which three optional clauses can be used when creating an external function? (Choose three.)
A. SCRATCHPAD
B. NOTEPAD
C. LANGUAGE
D. EXTERNAL NAME
E. DATABASEINFO
Answer: A, C, D

Q: 4
Which statement is permitted within a scalar user-defined function body?
A. COMMIT
B. INSERT
C. SIGNAL
D. LOOP
Answer: C

Q: 5
Which procedure demonstrates the correct use of dynamic SQL?
A. CREATE PROCEDURE update_count1 (INnew_count INTEGER, IN item_code INTEGER)
BEGIN
DECLARE v_dynSQL VARCHAR(200);
SET v_dynSQL = 'UPDATE stock SET quantity_on_hand=? WHERE item_number=?';
PREPARE v_stmt1 FROM v_dynSQL;
EXECUTE v_stmt1 USING new_count, item_code;
END
B. CREATE PROCEDURE update_count2 (INtab_name VARCHAR(128), IN new_count
INTEGER, IN item_code INTEGER)
BEGIN
DECLARE v_dynSQL VARCHAR(200);
SET v_dynSQL = 'UPDATE ? SET quantity_on_hand=? WHERE item_number=?';
PREPARE v_stmt1 FROM v_dynSQL;
EXECUTE v_stmt1 USING tab_name, new_count, item_code;
END
C. CREATE PROCEDURE update_count4 (INtab_name VARCHAR(128), IN col_name1
VARCHAR(128), IN col_name2 VARCHAR(128), IN new_countINTEGER, IN item_code
INTEGER) BEGIN
DECLARE v_dynSQL VARCHAR(200);
SET v_dynSQL = 'UPDATE ? SET ?=? WHERE ?=?';
PREPARE v_stmt1 FROM v_dynSQL;
EXECUTE v_stmt1 USING tab_name, col_name1, new_count, col_name2, item_code;
END
D. CREATE PROCEDURE update_count5 (INnew_count INTEGER, IN item_code INTEGER)
BEGIN
DECLARE v_dynSQL VARCHAR(200);
DECLARE v_col_name VARCHAR(128);
SET v_col_name = 'item_number';
SET v_dynSQL = 'UPDATE stock SET quantity_on_hand=? WHERE ?=?';
PREPARE v_stmt1 FROM v_dynSQL;
EXECUTE v_stmt1 USING new_count, v_col_name, item_code;
END
Answer: A


© 2014 Cheat-Test.com, All Rights Reserved