SCO供应链协同

## 数据表：T_SPM_PROMOTIONTYPE(促销类型)

### T_SPM_PROMOTIONTYPE(促销类型)：描述

名称 | T_SPM_PROMOTIONTYPE(促销类型)
代码 | T_SPM_PROMOTIONTYPE
注释 | 促销类型
模型 | SCO供应链协同
主键 | PK_SPM_PROMOTIONTYPE

### T_SPM_PROMOTIONTYPE(促销类型)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
主键ID | FPROMOTIONTYPEID | int |  | TRUE |
编码 | FNUMBER | nvarchar(50) | 50 | TRUE |
是否系统预置 | FISSYSTEM | char(1) | 1 | TRUE |
禁用状态 | FFORBIDSTATUS | char(1) | 1 | TRUE |

### T_SPM_PROMOTIONTYPE(促销类型)：脚本代码

if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_SPM_PROMOTIONMODE') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONMODE
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_SPM_PROMOTIONTYPE_L') and o.name = 'FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR')
alter table T_SPM_PROMOTIONTYPE_L
drop constraint FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR
go
if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_SPM_PROMOTIONWAY') and o.name = 'FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR')
alter table T_SPM_PROMOTIONWAY
drop constraint FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONTYPE')
and name = 'IDX_SPM_PROMOTIONTYPE_NUM'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONTYPE.IDX_SPM_PROMOTIONTYPE_NUM
go
if exists (select 1
from sysobjects
where id = object_id('T_SPM_PROMOTIONTYPE')
and type = 'U')
drop table T_SPM_PROMOTIONTYPE
go
/*==============================================================*/
/* Table: T_SPM_PROMOTIONTYPE */
/*==============================================================*/
create table T_SPM_PROMOTIONTYPE (
FPROMOTIONTYPEID int not null default 0,
FNUMBER nvarchar(50) not null default '',
FISSYSTEM char(1) not null default '',
FFORBIDSTATUS char(1) not null default '',
constraint PK_SPM_PROMOTIONTYPE primary key (FPROMOTIONTYPEID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'促销类型',
'user', @CurrentUser, 'table', 'T_SPM_PROMOTIONTYPE'
go
/*==============================================================*/
/* Index: IDX_SPM_PROMOTIONTYPE_NUM */
/*==============================================================*/
create index IDX_SPM_PROMOTIONTYPE_NUM on T_SPM_PROMOTIONTYPE (
FNUMBER ASC,
FFORBIDSTATUS ASC
)
go

### T_SPM_PROMOTIONTYPE(促销类型)：键值定义

名称 | 代码 | 主要的
PK_SPM_PROMOTIONTYPE | PK_SPM_PROMOTIONTYPE | TRUE

### T_SPM_PROMOTIONTYPE(促销类型)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SPM_PROMOTIONTYPE_NUM | IDX_SPM_PROMOTIONTYPE_NUM | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONTYPE(促销类型)

上一页

主页

下一页