- 爱易网页
- 
                            MSSQL教程
- 帮忙给个文件(100分),该怎么解决 
日期:2014-05-18  浏览次数:20963 次 
                    
                        
                         帮忙给个文件(100分)
现在急需《SQL   Server数据库开发经典案例解析》一书中进销存实例的数据库脚本 
 希望大家提供!cnspider_max@126.com 
 或者提供全面的进销存建库脚本,类似于《SQL   Server数据库开发经典案例解析》这本书中的! 
 收到邮件即结贴!
------解决方案--------------------
/* Microsoft SQL Server - Scripting			*/ 
 /* Server: 屠蔚华的计算机					*/ 
 /* Database: Test					*/ 
 /* Creation Date 99-7-2 12:45:53 			*/ 
  
 set quoted_identifier on 
 GO 
  
 /****** Object:  Table dbo.Retreat    Script Date: 99-7-2 12:45:54 ******/ 
 if exists (select * from sysobjects where id = object_id( 'dbo.Retreat ') and sysstat & 0xf = 3) 
 	drop table  "dbo ". "Retreat " 
 GO 
  
 /****** Object:  Table dbo.Input    Script Date: 99-7-2 12:45:54 ******/ 
 if exists (select * from sysobjects where id = object_id( 'dbo.Input ') and sysstat & 0xf = 3) 
 	drop table  "dbo ". "Input " 
 GO 
  
 /****** Object:  Table dbo.Output    Script Date: 99-7-2 12:45:54 ******/ 
 if exists (select * from sysobjects where id = object_id( 'dbo.Output ') and sysstat & 0xf = 3) 
 	drop table  "dbo ". "Output " 
 GO 
  
 /****** Object:  Table dbo.Store    Script Date: 99-7-2 12:45:54 ******/ 
 if exists (select * from sysobjects where id = object_id( 'dbo.Store ') and sysstat & 0xf = 3) 
 	drop table  "dbo ". "Store " 
 GO 
  
 /****** Object:  Table dbo.Product    Script Date: 99-7-2 12:45:54 ******/ 
 if exists (select * from sysobjects where id = object_id( 'dbo.Product ') and sysstat & 0xf = 3) 
 	drop table  "dbo ". "Product " 
 GO 
  
 /****** Object:  Table dbo.Businessman    Script Date: 99-7-2 12:45:54 ******/ 
 if exists (select * from sysobjects where id = object_id( 'dbo.Businessman ') and sysstat & 0xf = 3) 
 	drop table  "dbo ". "Businessman " 
 GO 
  
 /****** Object:  Table dbo.Customer    Script Date: 99-7-2 12:45:54 ******/ 
 if exists (select * from sysobjects where id = object_id( 'dbo.Customer ') and sysstat & 0xf = 3) 
 	drop table  "dbo ". "Customer " 
 GO 
  
 /****** Object:  Table dbo.Factory    Script Date: 99-7-2 12:45:54 ******/ 
 if exists (select * from sysobjects where id = object_id( 'dbo.Factory ') and sysstat & 0xf = 3) 
 	drop table  "dbo ". "Factory " 
 GO 
  
 /****** Object:  Table dbo.Businessman    Script Date: 99-7-2 12:45:54 ******/ 
 CREATE TABLE  "dbo ". "Businessman " ( 
 	 "b_id " varchar (10) NOT NULL , 
 	 "b_name " varchar (20) NOT NULL , 
 	 "b_addr " varchar (40) NULL , 
 	 "b_phone " varchar (20) NULL , 
 	 "b_limitsalary " numeric(10, 2) NOT NULL , 
 	 "b_workyear "  "int " NOT NULL , 
 	 "b_trades " numeric(12, 2) NOT NULL , 
 	CONSTRAINT  "PK_Businessman_1__14 " PRIMARY KEY  CLUSTERED  
 	( 
 		 "b_id " 
 	) 
 ) 
 GO 
  
 /****** Object:  Table dbo.Customer    Script Date: 99-7-2 12:45:54 ******/ 
 CREATE TABLE  "dbo ". "Customer " ( 
 	 "c_id " varchar (10) NOT NULL , 
 	 "c_name " varchar (20) NOT NULL , 
 	 "c_addr " varchar (40) NULL , 
 	 "c_phone " varchar (20) NULL , 
 	CONSTRAINT  "PK_Customer_1__14 " PRIMARY KEY  CLUSTERED  
 	( 
 		 "c_id " 
 	) 
 ) 
 GO 
  
 /****** Object:  Table dbo.Factory    Script Date: 99-7-2 12:45:55 ******/ 
 CREATE TABLE  "dbo ". "Factory " (