26 August 2010

"No commit!" observed several players re: 25 August quiz (1363)

Three players wrote with a concern: the code in the 25 August quiz question inserts three rows into a table, does not commit and then asks: "Which of the following blocks display "1" (without the double quotes) after execution?" Here is the most thorough comment submitted on this: "Today's quiz is somewhat questionable as its 'create/populate' section does not contain COMMIT after inserts and it is not specified explicitly that PL/SQL blocks in question are executed in the same session." Now, it is true that I usually do include a COMMIT; and I often also include the word "then" in the final question about "which choice," to give a sense of immediacy to the process: I create the table, then I run this block. Having said all that, I do not think there was a lot of room for misinterpretation here. It would seem to me that the obvious and completely reasonable interpretation is that the various blocks ran in the same session immediately after creating and populating the table. So I do not plan to change any scores in response to these comments. Anyone feel differently?

1 comment:

  1. Hi Steven, Its pretty clear that the blocks will be executed in the same session and We(to be specific I) notified this not to change the scores. Indeed I too selected the options which everyone had. But I just noticed a slight change in the way you wrote the insertion block with out a COMMIT(which you have never done before). Anyways thanks for your response steve.