



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
create database 商品管理数据库gouse 商品管理数据库gocreate table 客户信息表(客户编号nchar(8) not null primary key,客户姓名nvarchar(5) not null ,联系电话nvarchar(11) not null Unique,地址 nvarchar(30) not null Default辽宁沈阳,邮箱 nvarchar(20) null check(邮箱like %.%) )create table 商品类型表(商品类型编号nchar(6) not null primary key,商品类型名 nvarchar(10) not null) create table 商品信息表(商品编号nchar (8) not null primary key,商品类型编号nchar (6) not null references 商品类型表(商品类型编号),商品名称nvarchar (20) not null,商品单位nchar (2) not null Default个,产地 nvarchar (30) not null Default辽宁沈阳)create table 进货信息表(进货编号int not null primary key identity (1,1),商品编号nchar (8) not null references 商品信息表(商品编号),进货单价decimal (6,2) not null check(进货单价=0),进货数量int not null check(进货数量0), 进货金额 decimal ,进货日期 datetime not null Default getdate() )create table 销售信息表(销售编号int not null primary key identity (1,1),商品编号nchar (8) not null references 商品信息表(商品编号),销售单价decimal (6,2) not null check(销售单价=0),销售数量int not null check(销售数量0), 销售金额 decimal ,销售日期 datetime not null Default getdate(),客户编号nchar (8) not null references 客户信息表(客户编号)create table 库存信息表(库存编号int not null primary key identity (1,1),商品编号nchar (8) not null references 商品信息表(商品编号),库存数量int not null check(库存数量=0)gouse 商品管理数据库goinsert into 客户信息表(客户编号,客户姓名,联系电话,地址,邮箱) select20130001,张峰辽宁沈阳, union all select20130002,赵小天辽宁大连, union all select20130003,钱成辽宁锦州, union all select20130004,孙飞辽宁沈阳, union all select20130005,李小明辽宁盘连, union all select20130006,周笑辽宁大连, gouse 商品管理数据库goinsert into 商品类型表(商品类型编号,商品类型名)selectRZL001,日杂类 union allselectSPL001,饮料类 union allselectSPL002,食品类 union allselectWJL001,文具类 gouse 商品管理数据库goinsert into 商品信息表(商品编号,商品类型编号,商品名称,商品单位,产地) select11110001,SPL001,可口可乐,个,辽宁沈阳 union all select11110002,SPL001,矿泉水,个,辽宁沈阳 union all select11110003,SPL001,雪花啤酒,个,辽宁沈阳 union all select11110004,SPL001,青岛啤酒,个,辽宁沈阳 union all select22220001,SPL002,德芙巧克力(牛奶),个,辽宁沈阳 union all select22220002,SPL002,士力架,个,辽宁沈阳 union all select22220003,SPL002,彩虹糖,袋,辽宁沈阳 union all select33330001,WJL001,中华铅笔,个,辽宁沈阳 union all select33330002,WJL001,大演算,个,辽宁沈阳 union all select33330003,WJL001,便签本,个,辽宁沈阳 union all select33330004,WJL001,曲别针,盒,辽宁沈阳 union all select33330005,WJL001,真彩签字笔(黑),个,辽宁沈阳 union all select33330006,WJL001,真彩签字笔(红),个,辽宁沈阳 union all select33330007,WJL001,鸵鸟钢笔水(深蓝),个,辽宁沈阳 union all select33330008,WJL001,鸵鸟钢笔水(纯蓝),个,辽宁沈阳 union all select44440001,RZL001,雕牌透明皂,个,辽宁沈阳 union all select44440002,RZL001,中华牙膏,个,辽宁沈阳 union all select44440003,RZL001,心相印纸巾(无味*10),个,辽宁沈阳 union all select44440004,RZL001,飘柔洗发(ml),个,辽宁沈阳 union all select44440005,RZL001,枪手杀虫剂(ml),个,辽宁沈阳 union all select44440006,RZL001,金鸡鞋油,个,辽宁沈阳gouse 商品管理数据库goinsert into 销售信息表(商品编号,销售单价,销售数量,销售金额,销售日期,客户编号) select 11110001,3.00,50,150.00,2012-12-01,20130001 union allselect 22220001,8.00,50,400.00,2012-12-01,20130003 union allselect 22220002,3.50,50,175.00,2012-12-11,20130001 union allselect 22220003,3.50,50,175.00,2012-12-01,20130002 union allselect 11110003,2.50,40,100.00,2012-12-20,20130005 union allselect 33330001,0.80,20,16.00,2012-12-20, 20130001gouse 商品管理数据库goinsert into 库存信息表(商品编号,库存数量)select 11110001,50 union allselect 11110002,200 union allselect 11110003,160 union allselect 22220001,170 union allselect 22220002,850 union allselect 22220003,400 union allselect 33330001,200 union allselect 33330002,580 union allselect 33330003,350 union allselect 33330004,300 union allselect 33330005,200 union allselect 33330006,110 union allselect 33330007,250 union allselect 44440001,200 union allselect 44440002,100 union allselect 44440003,150 union allselect 44440004,100 union allselect 44440005,100 union allselect 44440006,200 gouse 商品管理数据库goinsert into 进货信息表select11110001,2.00,100,200.00,2012-11-01 union allselect11110002,1.00,200,200.00,2012-11-01 union allselect11110003,2.00,200,400.00,2012-11-01 union allselect22220001,6.00,10,60.00,2012-11-01 union allselect22220002,2.00,300,600.00,2012-11-01 union allselect22220003,2.00,150,300.00,2012-11-01 union allselect33330002,0.40,150,60.00,2012-11-01 union allselect22220001,6.00,10,60.00,2012-11-02 union allselect22220002,2.00,300,600.00,2012-11-02 union allselect22220003,2.00,150,300.00,2012-11-02 union allselect33330002,0.40,150,60.00,2012-11-02 union allselect22220001,6.00,100,600.00,2012-11-02 union allselect33330002,0.80,150,120.00,2012-11-02 union allselect33330001,0.90,200,180.00,2012-11-02 union allselect33330003,0.60,350,210.00,2012-11-02 union allselect33330004,2.00,150,300.00,2012-11-02 union allselect33330005,1.00,200,200.00,2012-11-02 union allselect33330006,1.00,110,111.00,2012-11-03 union allselect33330007,3.00,100,300.00,2012-11-03 union allselect33330007,3.00,150,450.00,2012-11-03 union allselect44440001,2.00,200,400.00,2012-11-03 union allselect44440002,3.00,100,300.00,2012-11-03 union allselect44440003,5.00,150,750.00,2012-11-03 union allselect44440004,23.00,100,2300.00,2012-11-04 union allselect44440005,16.00,100,1600.00,2012-11-04 union allselect44440006,2.00,200,400.00,201
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 高项成本补偿合同模板(3篇)
- 高速公路护坡施工合同(3篇)
- 高速服务区施工合同(3篇)
- 安福县协管员招聘面试题及答案
- 无人机展览现场搭建与无人机飞行表演培训合同
- 产业链上下游企业股权整合及供应链优化合同
- 餐饮店铺转租与经营许可捆绑合同
- 房地产公司挂靠合作项目转让合同范本
- 人教部编版八年级道德与法治-下册-第三单元-人民当家作主-单元练习
- 经贸专业的面试题及答案
- 2025年市级科技馆招聘笔试重点解析
- 中国特色社会主义民族宗教理论知识竞赛题库及答案
- 2025年8月31日湖南省市直遴选笔试真题及答案解析(B卷)
- 液化气瓶安全知识培训课件
- 毕节法院辅警面试题目及答案
- 足浴店突发事件应急处置预案
- 柴油安全知识培训课件
- 中药制备工艺汇报课件
- 儿童早期发展中的回应性照护模式研究
- 幼儿园大班自然教育实施策略与效果研究
- 住宅工程质量常见问题防治技术标准DBJ 43T 302-2025知识解读
评论
0/150
提交评论