The statement will work correctly. The generated key returned will be
the key generated by that execution of that statement for that user. These
are SQL-defined semantics. Any implementation where it didn't work would be
NB the result set cannot be null at the point you're testing it.