Which statement will return the last sequence number generated by the EMP_SEQ sequence?
Which statement will return the last sequence number generated by the EMP_SEQ sequence?
To retrieve the last sequence number generated by the EMP_SEQ sequence, you need to use the CURRVAL pseudo column. The correct syntax for this in SQL is 'SELECT emp_seq.CURRVAL FROM DUAL;'. The DUAL table is a special one-row, one-column table present by default in all Oracle databases that allows you to perform operations without needing to query a specific table.
https://docs.oracle.com/cd/A84870_01/doc/server.816/a76989/ch26.htm This example selects the current value of the employee sequence: SELECT empseq.currval FROM DUAL;