4

In a transaction, if I select results to display to the screen, I get the message Query result with x rows discarded.

How can I view those results? Something is amiss with my query and I want to see what the values are in a temp table at a certain point.

4

In a transaction (or in an SQL function) only the results from the last command are returned to the user. You could write the results to a (temporary) table to inspect them later.

Or you run through your transaction interactively, executing one command after the other.

  • 1
    +1 - in my view it is typically the COMMIT; which makes the previous results discarded. Another posibility is to define temporary table without ON COMMIT DROP - so it is still there after committing and can be queried. – dezso May 30 '13 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.