In this blog post, I reviewed the Auto Number attribute that already can handle the common scenario. There is a way to give a simple conditional Auto Number from Nishant Rana that you can read here. But what if we want to implement a more complex scenario to generate the Auto Number part for instance we want to generate Auto Number based on Type? For example, if Order Type A, generate A001. If Order Type B needs to generate B001? The possible solution is to create our own code. So today we will try to create auto number code using Azure SQL Sequence (Sequence can ensure every call will get unique value).
Create Azure SQL Database
You can go to your portal.azure.com >SQL databases> hit+ Createbutton > fill theSubscription,Resource Group, fill theDatabase name, createServer.
For…
View original post 876 more words