XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 12.3
    • None
    • Query Engine
    • None

      The docs suggest that generated_key should be called in a procedure. However calling outside of a procedure will currently return no values as the keys are associated with the executing command context only. Ideally from a connection the user should be able to do:

      insert into ...;

      select generated_key() ...;

      In separate statements and still retrieve the key value.

      The workaround is to use an anonymous procedure block:

      begin
      insert into ...;

      select generated_key() ...;
      end

              rhn-engineering-shawkins Steven Hawkins
              rhn-engineering-shawkins Steven Hawkins
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: