Autoincrement primary key for Oracle: Suppose you have a database and you want each entry to be identified by a unique number. You can do this easily in mysql by specifying 'auto_increment' for your number, but Oracle makes you work a little more to get it done. Here is one way to do it by creating two database objects, a sequence and a trigger. I find myself wanting to do this every now and then but not often enough that I remember the syntax from time to time, so I decided it was time to write myself up a little cheat sheet. This is an extremely basic outline, so please try it first on a test table if you don't know what you're doing.