sql问题

v5five 2012-08-28 08:52:04
CREATE TABLE tbl_Restaurant
(
RestaurantId INT IDENTITY(1,1) PRIMARY KEY,--primary key of Restaurant
Name NVARCHAR(200) UNIQUE not null,
ResAddress NVARCHAR(500),
DeliverCondition NVARCHAR(200),
ServiceTime VARCHAR(15),-- restaruant service time
ImagePath NVARCHAR(500),
ResDescription NVARCHAR(2000),
Label NVARCHAR(500),
IsDeleted BIT,
DeletedTime DATETIME,
PhoneNo VARCHAR(100) NOT NULL,
AverageCost INT, --the average of you cost
IsDelivery BIT, --does the restaurant delivery or not?
StarCounts NUMERIC(2,1) DEFAULT 3.0 --customers' evaluate the restaurant
)
GO


对这个表进行添加修改存储过程,并进行检测
...全文
104 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
以学习为目的 2012-08-28
  • 打赏
  • 举报
回复

CREATE TABLE tbl_restaurant (
restaurantid INT IDENTITY( 1 , 1 ) PRIMARY KEY,--primary key of Restaurant
name NVARCHAR(200) UNIQUE NOT NULL,
resaddress NVARCHAR(500),
delivercondition NVARCHAR(200),
servicetime VARCHAR(15),-- restaruant service time
imagepath NVARCHAR(500),
resdescription NVARCHAR(2000),
label NVARCHAR(500),
isdeleted BIT,
deletedtime datetime,
phoneno VARCHAR(100) NOT NULL,
averagecost INT, --the average of you cost
isdelivery BIT, --does the restaurant delivery or not?
starcounts NUMERIC(2,1) DEFAULT 3.0 --customers' evaluate the restaurant
)

GO

添加修改存储过程?
v5five 2012-08-28
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 的回复:]
上面是格式,照着这个来写就可以了
[/Quote]
还有就是 怎么去测试它,求帮助 谢谢
tys101582 2012-08-28
  • 打赏
  • 举报
回复
上面是格式,照着这个来写就可以了
tys101582 2012-08-28
  • 打赏
  • 举报
回复

-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE tbl_Restaurant_pro
-- Add the parameters for the stored procedure here
<@Param1, sysname, @p1> <Datatype_For_Param1, , int> = <Default_Value_For_Param1, , 0>,
<@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0>
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here
SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
END
GO
v5five 2012-08-28
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]
找个自动生成工具
[/Quote]
我想自己写 怎么写啊?
昵称被占用了 2012-08-28
  • 打赏
  • 举报
回复
找个自动生成工具
v5five 2012-08-28
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 的回复:]
SQL code


CREATE TABLE tbl_restaurant (
restaurantid INT IDENTITY( 1 , 1 ) PRIMARY KEY,--primary key of Restaurant
name NVARCHAR(200) UNIQUE NOT NULL,
resaddress N……
[/Quote]
是的

684

社区成员

发帖
与我相关
我的任务
社区描述
智能路由器通常具有独立的操作系统,包括OpenWRT、eCos、VxWorks等,可以由用户自行安装各种应用,实现网络和设备的智能化管理。
linuxpython 技术论坛(原bbs)
社区管理员
  • 智能路由器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧