12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
-
- use [db]
- go
- set ansi_nulls on
- go
- set quoted_identifier on
- go
- set ansi_padding on
- go
- if not exists(select * from dbo.sysobjects where id = object_id(N'NetShareInfo') and objectproperty(id,'IsTable') = 1)
- begin
- create table [dbo].[NetShareInfo](
- [enable] [bit] default(1) not null,
- [branchid] [nvarchar](32) null,
- [enable] [bit] default(1) not null,
- [shareHost] [nvarchar](16) not null,
- [sharePath] [nvarchar](16) not null,
- [mincapacity] [tinyint] default(30) not null,
- [maxcapacity] [tinyint] default(30) not null,
- [photoType] [tinyint] not null,
- [priority] [tinyint] default(1) not null,
-
- constraint [PK_NetShareinfo] primary key clustered
- (
- [branchid] asc,
- [shareHost] asc,
- [sharePath] asc
- ) with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on,allow_page_locks = on) on [primary],
-
- constraint [PK_NetShareInfo_U] unique nonclustered
- (
- [branchid] asc,
- [photoType] asc,
- [priority] asc
- ) with (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on,allow_page_locks = on) on [primary]
- ) on [primary]
- end
- go
- alter table [dbo].[NetShareInfo] with check add check([mincapacity] >= 5)
- alter table [dbo].[NetShareInfo] with check add check([maxcapacity] >= 35)
- go
- alter table [dbo].[NetShareInfo] with check add check([priority] >= 1)
- go
- set ansi_padding off
|