I want a custom id for each user. for example: "AG01" , i am working on asp.net web forms
Loading
I want a custom id for each user. for example: "AG01" , i am working on asp.net web forms
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Puneet KankarPosted Jan 2, 2023, 3:46 PM
Hi Garima,
You can create functions or directly write these type code into stored proc.
https://www.sqlteam.com/articles/custom-auto-generated-sequences-with-sql-server
https://www.kodyaz.com/t-sql/custom-sequence-string-as-sql-identity-column.aspx
Vishal YelvePosted Jan 2, 2023, 12:14 PM
https://steemit.com/database/@virajtakke09/how-to-generate-unique-id-character-number-for-customer-in-sql-server
Sachin SinghPosted Jan 2, 2023, 7:26 AM
The easiest way is to define the table such that you don't need to insert tha value manually from applictaion.
Now, you don't need to enter the value of UserID