create table [dbo].[zz_accessip](
[ip] [nvarchar](50) not null,
[firstdatetime] [datetime] not null,
[lastdatetime] [datetime] not null,
[times] [int] not null,
constraint [pk_zz_accessip] primary key clustered
(
[ip] asc
)with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary]
) on [primary]
go
alter table [dbo].[zz_accessip] add constraint [df_zz_accessip_firstdatetime] default (getdate()) for [firstdatetime]
go
alter table [dbo].[zz_accessip] add constraint [df_zz_accessip_lastdatetime] default (getdate()) for [lastdatetime]
go
alter table [dbo].[zz_accessip] add constraint [df_zz_accessip_times] default ((0)) for [times]
go