I want to make a table in SqlServer that will add, on insert, a auto incremented primary key. This should be an autoincremented id similar to MySql auto_increment functionality. (Below)
create table foo  
(  
user_id int not null auto_increment,  
name varchar(50)  
)  
Is there a way of doing this with out creating an insert trigger?
Like this
create table foo  
(  
user_id int not null identity,  
name varchar(50)  
)
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With