IF Not EXISTS(SELECT * FROM sysobjects WHERE name='Users')
Begin
CREATE TABLE [dbo].[Users](
	[Id] [SMALLINT] IDENTITY(1,1) NOT NULL,
	[Name] [NVARCHAR](35) NOT NULL,
	[UserName] [SMALLINT] NOT NULL,
	[Password] [CHAR](32) NULL,
	[Role] [TINYINT] NOT NULL,
	[PyramidPermission] [VARCHAR](400) NULL,
	[DrugPermission] [VARCHAR](400) NULL,
	[LoginPermision] [VARCHAR](20) NULL,
	[Store_Code] [VARCHAR](3) NULL,
	[IsActive] [BIT] NULL,
 CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED 
(
  [Id] ASC
)
) ON [PRIMARY]

ALTER TABLE [dbo].[Users] ADD  CONSTRAINT [DF_Users_Role]  DEFAULT ((1)) FOR [Role]
ALTER TABLE [dbo].[Users] ADD  CONSTRAINT [DF_Users_IsActive]  DEFAULT ((1)) FOR [IsActive]
End
