samsteachyourselfSqlin24hours的范例表格Mysql版本。
来源:互联网 发布:node express视频教程 编辑:程序博客网 时间:2024/04/28 11:50
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
想找个范例的数据库原来真不是简单。呵呵
原书本上的数据库只是个标准,不是实现的版本。
在网上艰辛地找到了这个表格之后与发现自已用的Mysql字段的类型不符。
于是做了改动。下面的Sql文件可以直接导入Mysql了。
有了这个东东。可以节省很多输入的时间。学习更方便了。
--study.sql文件如下:
createdatebasestudy;
usestudy
--表employee_tbl结构
createtableemployee_tbl
(emp_idvarchar(9)notnull,
last_namevarchar(15)notnull,
first_namevarchar(15)notnull,
middle_namevarchar(15),
addressvarchar(30)notnull,
cityvarchar(15)notnull,
statechar(2)notnull,
zipnumeric(5)notnull,
phonechar(10),
pagerchar(10),
constraintemp_pkprimarykey(emp_id));
--表employee_pay_tbl结构
createtableemployee_pay_tbl
(emp_idvarchar(9)notnull,
positionvarchar(15)notnull,
date_hiredate,
pay_ratenumeric(4,2),
date_last_raisedate,
salarynumeric(8,2),
bonusnumeric(6,2),
constraintemp_fkforeignkey(emp_id)referencesemployee_tbl(emp_id));
--表customer_tbl结构
createtablecustomer_tbl
(cust_idvarchar(10)notnullprimarykey,
cust_namevarchar(30)notnull,
cust_addressvarchar(20)notnull,
cust_cityvarchar(15)notnull,
cust_statechar(2)notnull,
cust_zipnumeric(5)notnull,
cust_phonenumeric(10),
cust_faxnumeric(10));
--表orders_tbl结构
createtableorders_tbl
(ord_numvarchar(10)notnullprimarykey,
cust_idvarchar(10)notnull,
prod_idvarchar(10)notnull,
qtynumeric(6)notnull,
ord_datedate);
--表products_tbl结构
createtableproducts_tbl
(prod_idvarchar(10)notnullprimarykey,
prod_descvarchar(40)notnull,
costnumeric(6,2)notnull);
以下是各表的插入记录。
insertintoemployee_tblvalues
('311549902','STEPHENS','TINA','DAWN','RR3BOX17A','GREENWOOD',
'IN','47890','3178784465',NULL);
insertintoemployee_tblvalues
('442346889','PLEW','LINDA','CAROL','3301REACON','INDIANAPOLIS',
'IN','46224','3172978990',NULL);
insertintoemployee_tblvalues
('213764555','GLASS','BRANDON','SCOTT','1710MAINST','WHITELAND',
'IN','47885','3178984321','3175709980');
insertintoemployee_tblvalues
('313782439','GLASS','JACOB',NULL,'3789WHITERIVERBLVD',
'INDIANAPOLIS','IN','45734','3175457676','8887345678');
insertintoemployee_tblvalues
('220984332','WALLACE','MARIAH',NULL,'7889KEYSTONEAVE',
'INDIANAPOLIS','IN','48741','3173325986',NULL);
insertintoemployee_tblvalues
('443679012','SPURGEON','TIFFANY',NULL,'5GEORGECOURT',
'INDIANAPOLIS','IN','46234','317569007',NULL);
insertintoemployee_pay_tblvalues
('311549902','MARKETING','1989-05-23',NULL,'1997-05-01','40000',NULL);
insertintoemployee_pay_tblvalues
('442346889','TEAMLEADER','1990-06-17','14.75','1997-06-01',NULL,NULL);
insertintoemployee_pay_tblvalues
('213764555','SALESMANAGER','1994-08-14',NULL,'1997-08-01','30000','2000');
insertintoemployee_pay_tblvalues
('313782439','SALESMAN','1997-06-28',NULL,NULL,'20000','1000');
insertintoemployee_pay_tblvalues
('220984332','SHIPPER','1996-07-22','11.00','1997-07-01',NULL,NULL);1<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
想找个范例的数据库原来真不是简单。呵呵
原书本上的数据库只是个标准,不是实现的版本。
在网上艰辛地找到了这个表格之后与发现自已用的Mysql字段的类型不符。
于是做了改动。下面的Sql文件可以直接导入Mysql了。
有了这个东东。可以节省很多输入的时间。学习更方便了。
--study.sql文件如下:
createdatebasestudy;
usestudy
--表employee_tbl结构
createtableemployee_tbl
(emp_idvarchar(9)notnull,
last_namevarchar(15)notnull,
first_namevarchar(15)notnull,
middle_namevarchar(15),
addressvarchar(30)notnull,
cityvarchar(15)notnull,
statechar(2)notnull,
zipnumeric(5)notnull,
phonechar(10),
pagerchar(10),
constraintemp_pkprimarykey(emp_id));
--表employee_pay_tbl结构
createtableemployee_pay_tbl
(emp_idvarchar(9)notnull,
positionvarchar(15)notnull,
date_hiredate,
pay_ratenumeric(4,2),
date_last_raisedate,
salarynumeric(8,2),
bonusnumeric(6,2),
constraintemp_fkforeignkey(emp_id)referencesemployee_tbl(emp_id));
--表customer_tbl结构
createtablecustomer_tbl
(cust_idvarchar(10)notnullprimarykey,
cust_namevarchar(30)notnull,
cust_addressvarchar(20)notnull,
cust_cityvarchar(15)notnull,
cust_statechar(2)notnull,
cust_zipnumeric(5)notnull,
cust_phonenumeric(10),
cust_faxnumeric(10));
--表orders_tbl结构
createtableorders_tbl
(ord_numvarchar(10)notnullprimarykey,
cust_idvarchar(10)notnull,
prod_idvarchar(10)notnull,
qtynumeric(6)notnull,
ord_datedate);
--表products_tbl结构
createtableproducts_tbl
(prod_idvarchar(10)notnullprimarykey,
prod_descvarchar(40)notnull,
costnumeric(6,2)notnull);
以下是各表的插入记录。
insertintoemployee_tblvalues
('311549902','STEPHENS','TINA','DAWN','RR3BOX17A','GREENWOOD',
'IN','47890','3178784465',NULL);
insertintoemployee_tblvalues
('442346889','PLEW','LINDA','CAROL','3301REACON','INDIANAPOLIS',
'IN','46224','3172978990',NULL);
insertintoemployee_tblvalues
('213764555','GLASS','BRANDON','SCOTT','1710MAINST','WHITELAND',
'IN','47885','3178984321','3175709980');
insertintoemployee_tblvalues
('313782439','GLASS','JACOB',NULL,'3789WHITERIVERBLVD',
'INDIANAPOLIS','IN','45734','3175457676','8887345678');
insertintoemployee_tblvalues
('220984332','WALLACE','MARIAH',NULL,'7889KEYSTONEAVE',
'INDIANAPOLIS','IN','48741','3173325986',NULL);
insertintoemployee_tblvalues
('443679012','SPURGEON','TIFFANY',NULL,'5GEORGECOURT',
'INDIANAPOLIS','IN','46234','317569007',NULL);
insertintoemployee_pay_tblvalues
('311549902','MARKETING','1989-05-23',NULL,'1997-05-01','40000',NULL);
insertintoemployee_pay_tblvalues
('442346889','TEAMLEADER','1990-06-17','14.75','1997-06-01',NULL,NULL);
insertintoemployee_pay_tblvalues
('213764555','SALESMANAGER','1994-08-14',NULL,'1997-08-01','30000','2000');
insertintoemployee_pay_tblvalues
('313782439','SALESMAN','1997-06-28',NULL,NULL,'20000','1000');
insertintoemployee_pay_tblvalues
('220984332','SHIPPER','1996-07-22','11.00','1997-07-01',NULL,NULL);1
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- samsteachyourselfSqlin24hours的范例表格Mysql版本。
- sam's teach yourself Sql in 24hours的范例数据库表格Mysql版本。
- Mysql的一些命令范例
- LaTeX表格范例
- [收藏]颠倒表格顺序的javascript范例代码
- MySQL的常见SQL语句范例
- 今后输出表格之范例div表格
- 锁定表格栏位范例网页
- 锁定表格栏位范例网页
- 在struts2,hibernate.spring版本包里找配置的范例文件
- 把附件(WORD、EXCEL、PDF)或图片存贮到数据库的完整范例程序。(MYSQL、SQL SERVER、ORACLE)三个版本
- 把附件(WORD、EXCEL、PDF)或图片存贮到数据库的完整范例程序。(MYSQL、SQL SERVER、ORACLE)三个版本
- mysql 游标使用范例!!
- mysql 存储过程 范例
- MySQL命令范例
- mysql 基本语句范例
- MySql过程语句范例
- 通过JDBC API 访问mysql数据库的servlet范例程序
- 第六章 人力资源管理概述习题解答
- MySecondPL/SQLProcedure
- 第七章 人力资源管理概述习题解答
- 术语VCL的变更:从VCL到CLX
- 致力于数据切分的Amoeba for mysql 0.12版本发布
- samsteachyourselfSqlin24hours的范例表格Mysql版本。
- 大众文化与文化产业
- 大众文化课件
- 创建不规则形状的Control
- MYSQL新版出现"Clientdoesnotsupportauthenticationprotocolrequestedbyserver;consi
- 原创:FLI8125欧州项目为什么失败
- 在Delphi.net中调用COM/COM+
- 如何让ie6 ie7 并存
- Resources