RETURN 1
CREATE PROCEDURE Login_ADD @userId varchar(10), @password varchar(16), @userName varchar(20), @tel varchar(20),
@birthday smalldatetime, @registerTime smalldatetime, @type nvarchar(50) AS
CREATE PROCEDURE Login_Update @userId varchar(10), @password varchar(16), @userName varchar(20), @tel varchar(20),
@birthday smalldatetime, @registerTime smalldatetime, @type nvarchar(50) AS
CREATE PROCEDURE Login_Delete @userId varchar(10) AS
CREATE PROCEDURE Login_GetModel
DELETE [Login]
WHERE userId=@userId UPDATE [Login] SET
[password] = @password,[userName] = @userName,[tel] = @tel,[birthday] WHERE userId=@userId INSERT INTO [Login](
[userId],[password],[userName],[tel],[birthday],[registerTime],[t)VALUES(
@userId,@password,@userName,@tel,@birthday,@registerTime,@type )
ype]
= @birthday,[registerTime] = @registerTime,[type] = @type
@userId varchar(10) AS
CREATE PROCEDURE Login_GetList AS
CREATE PROCEDURE Product_info_GetMaxId AS
CREATE PROCEDURE Product_info_Exists @proId int AS
CREATE PROCEDURE Product_info_ADD @proId int output, @name varchar(50), @price varchar(6),
DECLARE @TempID int
SELECT @TempID = count(1) FROM [Product_info] WHERE proId=@proId IF @TempID = 0
RETURN 0 RETURN 1 ELSE
DECLARE @TempID int
SELECT @TempID = max([proId])+1 FROM [Product_info] IF @TempID IS NULL
RETURN 1 RETURN @TempID ELSE SELECT
userId,password,userName,tel,birthday,registerTime,type FROM [Login] SELECT
userId,password,userName,tel,birthday,registerTime,type FROM [Login]
WHERE userId=@userId
@proDate smalldatetime, @storage varchar(4) AS
CREATE PROCEDURE Product_info_Update @proId int,
@name varchar(50), @price varchar(6), @proDate smalldatetime, @storage varchar(4) AS
CREATE PROCEDURE Product_info_Delete @proId int AS
CREATE PROCEDURE Product_info_GetModel @proId int AS
CREATE PROCEDURE Product_info_GetList AS
SELECT
proId,name,price,proDate,storage FROM [Product_info] WHERE proId=@proId DELETE [Product_info] WHERE proId=@proId
UPDATE [Product_info] SET
[name] = @name,[price] = @price,[proDate] = @proDate,[storage] = WHERE proId=@proId
INSERT INTO [Product_info](
[name],[price],[proDate],[storage] )VALUES(
@name,@price,@proDate,@storage )
SET @proId = @@IDENTITY
@storage
SELECT
proId,name,price,proDate,storage FROM [Product_info]
CREATE PROCEDURE Repair_info_GetMaxId AS
CREATE PROCEDURE Repair_info_Exists @repairId int AS
CREATE PROCEDURE Repair_info_ADD @repairId int output, @repairName nchar(10), @repairtel nchar(10), @product varchar(50), @customer varchar(20), @date smalldatetime, @customertel nchar(10) AS ]
)VALUES(
INSERT INTO [Repair_info](
[repairName],[repairtel],[product],[customer],[date],[customertelDECLARE @TempID int
SELECT @TempID = count(1) FROM [Repair_info] WHERE repairId=@repairId IF @TempID = 0
RETURN 0 RETURN 1 ELSE
DECLARE @TempID int
SELECT @TempID = max([repairId])+1 FROM [Repair_info] IF @TempID IS NULL
RETURN 1 RETURN @TempID ELSE
@repairName,@repairtel,@product,@customer,@date,@customertel )
SET @repairId = @@IDENTITY
CREATE PROCEDURE Repair_info_Update @repairId int,
@repairName nchar(10), @repairtel nchar(10), @product varchar(50), @customer varchar(20), @date smalldatetime, @customertel nchar(10) AS
UPDATE [Repair_info] SET
[repairName] = @repairName,[repairtel] = @repairtel,[product] =
@product,[customer] = @customer,[date] = @date,[customertel] = @customertel
CREATE PROCEDURE Repair_info_Delete @repairId int AS
CREATE PROCEDURE Repair_info_GetModel @repairId int AS
CREATE PROCEDURE Repair_info_GetList
SELECT
repairId,repairName,repairtel,product,customer,date,customertel FROM [Repair_info]
WHERE repairId=@repairId DELETE [Repair_info] WHERE repairId=@repairId WHERE repairId=@repairId
(完整版)数据库设计文档模板
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)