Hello friends, I want to Create a Table with a Alpha Numeric Sequence, Is there any way to create sequence without using Triggers. If so please Help me.. Thanks in Advance... regards askr
If you only have one process that writes to the table then you could do something like SELECT MAX() on a numeric column, add 1, then make that the identifier. That won't work with an alphanumeric sequence though. But if you have some way to determine the next valid sequence value then you can perform that operation before each insert. What are you trying to do? Why does the sequence need to be alphanumeric (as opposed to just numeric)?
Sir, We are creating a database for training institute, so for every table we want to use unique Number with Alpha Numeric...as it is going to be easy for identifying. Example for Students Table : Std1 Example for Batches Table : B105
Why isn't a simple number enough? For example, SELECT ... WHERE BATCHES.ID=105; is clear enough. You shouldn't need to include an abbreviation of the table name within the table ID field.