联系方式:17795758258
if exists (select 1
from sysindexes
where id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and name = 'IX_T_SaleCustomerNameChangeAttachment_FBillID'
and indid > 0
and indid < 255)
drop index dbo.T_SaleCustomerNameChangeAttachment.IX_T_SaleCustomerNameChangeAttachment_FBillID
go
if exists (select 1
from sysobjects
where id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and type = 'U')
drop table dbo.T_SaleCustomerNameChangeAttachment
go
/*==============================================================*/
/* Table: T_SaleCustomerNameChangeAttachment */
/*==============================================================*/
create table dbo.T_SaleCustomerNameChangeAttachment (
FID int not null,
FBillID int not null,
FAttachmentName varchar(255) collate Chinese_PRC_CI_AS not null,
FAttachment varbinary(Max) null,
FMender varchar(60) collate Chinese_PRC_CI_AS not null,
FModifyTime datetime not null,
FVer uniqueidentifier not null,
constraint PK_T_SaleCustomerNameChangeAttachment primary key (FID)
on SaleIndex
)
on SaleData
go
if exists (select 1 from sys.extended_properties
where major_id = object_id('dbo.T_SaleCustomerNameChangeAttachment') and minor_id = 0)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment'
end
execute sp_addextendedproperty 'MS_Description',
'客户名称变更附件',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment'
go
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'FID')
)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FID'
end
execute sp_addextendedproperty 'MS_Description',
'附件ID',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FID'
go
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'FBillID')
)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FBillID'
end
execute sp_addextendedproperty 'MS_Description',
'客户名称变更单ID',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FBillID'
go
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'FAttachmentName')
)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FAttachmentName'
end
execute sp_addextendedproperty 'MS_Description',
'附件名称',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FAttachmentName'
go
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'FAttachment')
)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FAttachment'
end
execute sp_addextendedproperty 'MS_Description',
'附件内容',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FAttachment'
go
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'FMender')
)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FMender'
end
execute sp_addextendedproperty 'MS_Description',
'修改人',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FMender'
go
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'FModifyTime')
)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FModifyTime'
end
execute sp_addextendedproperty 'MS_Description',
'修改时间',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FModifyTime'
go
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('dbo.T_SaleCustomerNameChangeAttachment')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'FVer')
)
begin
execute sp_dropextendedproperty 'MS_Description',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FVer'
end
execute sp_addextendedproperty 'MS_Description',
'FVer',
'user', 'dbo', 'table', 'T_SaleCustomerNameChangeAttachment', 'column', 'FVer'
go
/*==============================================================*/
/* Index: IX_T_SaleCustomerNameChangeAttachment_FBillID */
/*==============================================================*/
create index IX_T_SaleCustomerNameChangeAttachment_FBillID on dbo.T_SaleCustomerNameChangeAttachment (
FBillID ASC
)
on SaleIndex
go