Just update your trigger to only fire when not given an id.
create or replace
trigger sa.my_trigger
before insert on sa.my_table
for each row
when (new.id is null)
begin
select sa.my_sequence.nextval
into :new.id
from dual;
end;
More Related Contents:
- hibernate oracle sequence produces large gap
- ORA-04091: table [blah] is mutating, trigger/function may not see it
- Oracle trigger after insert or delete
- No more data to read from socket error
- Auto-increment in Oracle without using a trigger
- Trigger to enforce M-M relationship
- Spring boot Hibernate error “Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set” when working with multiple data sources
- Why is the GETDATE() an invalid identifier
- Oracle: difference between max(id)+1 and sequence.nextval
- Difference between LockModeType Jpa
- Printing the value of a variable in SQL Developer
- Spring 3 MVC: one-to-many within a dynamic form (add/remove on create/update)
- UTL_FILE.FOPEN() procedure not accepting path for directory?
- Oracle stored procedure with parameters for IN clause
- NLS_NUMERIC_CHARACTERS setting for decimal
- get next sequence value from database using hibernate
- What is the minimal setup required to deploy a .NET application with Oracle client 11?
- Best practice for pagination in Oracle?
- check if “it’s a number” function in Oracle
- Need to reset the value of sequence in Oracle
- ORA-12170: TNS:Connect timeout occurred
- Strange Jackson exception being thrown when serializing Hibernate object
- How to create and use temporary table in oracle stored procedure?
- Why cannot I use bind variables in DDL/SCL statements in dynamic SQL?
- error: ORA-65096: invalid common user or role name in Oracle database
- How to insert a column in a specific position in oracle without dropping and recreating the table?
- MySQL equivalent of ORACLES rank()
- Reading clob line by line with pl\sql
- Oracle: Days between two date and Exclude weekdays how to handle negative numbers
- How to generate a version 4 (random) UUID on Oracle?