Yes. You can do this either using a database specific mechanism. You don't mention the database type, but you could use a sequence, or an identity column, or an autoincremenet column, or a timestamp colum depending on the database. Or you can do this in your app. Its easy enough to do that - you'll need to use some sort of pattern (for example the HILO key generation pattern) to get a value and just update the database accordingly.
If you have an entity that needs a unique, unchanging, not null complaint number; is that not a primary key?