How can I create a table with custom ID like BK-0001001 with a sequence. Sorry I'm a newbie with databases. All help will be appreciated thank you!
SQL Server 2012 – How to Create Custom ID with Sequence
sequencesql-server-2012
Related Question
- SQL Server – Apply Custom Server Role to Existing Databases
- How to Generate a Sequence in MySQL
- PostgreSQL – How to Create Sequence and Table Simultaneously
- Sql-server – How to create 3 tables with references On SQL Server
- SQL Server – Custom Sequences with Replication and Auto-Increment
- Oracle SQL – Custom Sequence Using Trigger and Sequence
- SQL Server – Creating Sequence Based on Another Column’s Value
Best Answer
You can use a mix between a SEQUENCE and formatting a DEFAULT CONSTRAINT:
db<>fiddle here