I've recently started using Oracle 8i and discovered that there is no "easy" way of making the primary key automatically increment its value (compared to IDENTITY in MSSQL or auto_increment in MySQL). The way to solve it would be to use a sequence and add a trigger for the table that would retrieve NEXTVAL from that sequence.
My question is: Are there any other ways to do this? I don't really like using trigger unless I really have to. It also seems like an awful waste for doing something that simple since most primary keys should be automatically incremented.
My question is: Are there any other ways to do this? I don't really like using trigger unless I really have to. It also seems like an awful waste for doing something that simple since most primary keys should be automatically incremented.