if not exists (select top 1 1 from sys.objects where name = 'UserStatus' and type = 'U') begin create table UserStatus ( StatusId int identity(0, 1) constraint PK_UserStatus primary key, StatusCode varchar(30) not null, StatusName varchar(50) not null ) end go if not exists (select top 1 1 from UserStatus) begin insert into UserStatus(StatusCode, StatusName) select 'ACTIVE', 'Active' union select 'INACTIVE', 'Inactive' union select 'BLOCKED', 'Blocked' end go