Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam C2090-616 All Questions

View all questions & answers for the C2090-616 exam

Exam C2090-616 topic 1 question 9 discussion

Actual exam question from IBM's C2090-616
Question #: 9
Topic #: 1
[All C2090-616 Questions]

Which of the following statements about stored procedures is TRUE?

  • A. Stored procedures can be written in SQL PL, but not in the PL/SQL dialect
  • B. The CREATE SOURCED PROCEDURE statement defines a procedure that is based on another procedure in a federated database
  • C. There are three types of stored procedures which can be deployed: SQL procedures, external procedures, and sourced procedures
  • D. Two identically-named procedures within a schema are permitted to have exactly the same number of parameters, but the parameters must have different data types assigned
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Reference: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0023603.html

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
JamesBond
3 years, 4 months ago
C https://www.ibm.com/docs/en/db2/11.1?topic=statements-create-procedure
upvoted 1 times
...
db2tester
5 years, 1 month ago
The answer A is wrong because stored procedures can be written in SQL and in PL/SQL diaclect (iif you enable DB2_COMPATIBILITY_VECTOR at 800 or at ORA). The answer C is not totally correct : You have at least 4 types of stored procedures : SQL procedures, external procédures, sourced procedures and PL/SQL procedures (for the oracle compatibility). The anwser D is wrong because no two identically-named procedures within a schema are permitted to have exactly the same number of parameters. A duplicate signature raises an SQL error (SQLSTATE 42723). For example, given the statements: CREATE PROCEDURE PART (IN NUMBER INT, OUT PART_NAME CHAR(35)) ... CREATE PROCEDURE PART (IN COST DECIMAL(5,3), OUT COUNT INT) ...Kopieren the second statement will fail because the number of parameters in the procedure is the same, even if the data types are not.
upvoted 2 times
...
db2tester
5 years, 1 month ago
The answer B is correct. The CREATE PROCEDURE (sourced) statement defines a procedure (the sourced procedure) that is based on another procedure (the source procedure). In a federated system, a federated procedure is a sourced procedure whose source procedure is at a supported data source. Example : CREATE PROCEDURE FEDEMPLOYEE SOURCE USER1.P1.EMPLOYEE FOR SERVER S1 WITH RETURN TO CLIENT ALL 2/ Three different types of procedures can be created using this statement "CREATE PROCEDURE". Each of these types is described separately. a) External. The procedure body is written in a programming language. The external executable is referenced by a procedure defined at the current server, along with various attributes of the procedure. b) Sourced. The procedure body is part of the source procedure, which is referenced by the sourced procedure that is defined at the current server, along with various attributes of the procedure. A sourced procedure whose source procedure is at a data source is also called a federated procedure. c) SQL. The procedure body is written in SQL and defined at the current server, along with various attributes of the procedure.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...