sql - How do I create a Identity starting with a Letter first then numbers after? -
I want to create that data which contains information about my supplier so that it automatically generates its ID For example, Supplier ID I want to make it auto-generated after each other - SID001, SID002.
How can I do this with SQL?
Ask yourself: What is the cost of doing so? Specifically, what is the need to compare two strings vs compare two numbers? To generate strings from numbers?
Then ask yourself, what is the value added to the 'SID 0001' ID instead of 001?
Then ask yourself, what displayed is an easy way for each line without a prefix without storing it? (Answer: Yes, with database view).
Comments
Post a Comment