IF NOT EXISTS(SELECT Name FROM Sysobjects WHERE Name = 'Tbl_ClubH')
BEGIN 
CREATE TABLE [dbo].[Tbl_ClubH](
	[AutoId] [INT] IDENTITY(1,1) NOT NULL,
	[Mobile] [VARCHAR](13) NOT NULL,
	[Name] [NVARCHAR](60) NULL,
	[Addr] [NVARCHAR](150) NULL,
	[Tarikh] [SMALLDATETIME] NULL,
	[LastMessage] [NVARCHAR](120) NULL,
	[IsMale] [BIT] NULL,
	[BirthDate] [SMALLDATETIME] NULL,
	[SmsFlag] [BIT] NULL,
	[Pass_club] [CHAR](4) NULL,
	[CardPrintFlag] [BIT] NULL,
	[PostalCode] [VARCHAR](20) NULL,
	[Phone] [VARCHAR](15) NULL,
 CONSTRAINT [PK_Tbl_ClubH] PRIMARY KEY CLUSTERED 
(
	[AutoId] ASC
)
) ON [PRIMARY]

ALTER TABLE [dbo].[Tbl_ClubH] ADD  CONSTRAINT [DF_Tbl_ClubH_Tarikh]  DEFAULT (GETDATE()) FOR [Tarikh]
ALTER TABLE [dbo].[Tbl_ClubH] ADD  DEFAULT ((1)) FOR [IsMale]
ALTER TABLE [dbo].[Tbl_ClubH] ADD  DEFAULT ((1)) FOR [SmsFlag]
ALTER TABLE [dbo].[Tbl_ClubH] ADD  DEFAULT ((0)) FOR [CardPrintFlag]
End
