use master
go
if exists (select * from sysdatabases where name='LeechdomManage')
drop database LeechdomManage
go
create database LeechdomManage
on primary
(
name='LeechdomManage_data',
fileName='D:\LeechdomManage_data.mdf',
size=20MB,
filegrowth=5MB
)
log on
(
name='LeechdomManafe_log',
fileName='D:\LeechdomManage_log.ldf',
size=20MB,
filegrowth=5MB
)
go
use LeechdomManage
go
--创建药品基本信息表
if exists(select * from sysObjects where name='LeechdomInfo')
drop table LeechdomInfo
go
create table LeechdomInfo
(
LID varchar (15) not null primary key,--药品编号,主键
Lbid nvarchar (10) not null,--类别编号
Lbsid nvarchar (10) not null,--子类别编号
Lcid nvarchar (10) not null,--仓库编号
Lgid nvarchar (10) not null,--供货商编号
LName varchar (20) not null ,--药品名称
LTName varchar (20) ,--通用名
LBarCode varchar (30) not null,--商品条码
Lunit varchar (6) not null,--单位
LSpec varchar (15) not null,--产品规格
LStyle varchar (20),--药剂类型
LBatch varchar (20) not null,--批准字号
LNoUse char (4) ,--禁用
LMinStorage int not null,--最低库存
LMinPrice money ,--特价商品
LEnterPrice Money not null,--进价
LSalePrice Money not null,--售价
LManufacturer varchar(50) not null,--生产厂商
LRemark varchar (100)--备注
)
1