When I do an 'INSERT INTO <table> VALUES <row1,row2,row3>'
and on the table is a serial primary key named p_key.
As I want this number to be auto-generated, but use it as a 'customer number', I want to create this function to return the value of this insert.

Try this:

SELECT currval(<sequence name from table>);

Luis Sousa


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to