急求助Sqlserver存错过程
CREATE PROCEDURE [dbo].[getNews]
@News_subject nvarchar(1000) =null,
@News_content nvarchar(max) =null,
@type int,
@FileName varchar(255) =null,
@descriptions nvarchar(1000) =null,
@News_sources nvarchar(1000) =null,
@News_clicks int,
@News_author nvarchar(1000) =null,
@News_addtime datetime,
@show int,
@Thumbnail varchar(255) =null,
@width int,
@height int,
@titleColor varchar(255) =null,
@keywords nvarchar(1000) =null,
@News_ID int
AS
set nocount on
begin
If @News_ID is Null Return
Select @News_subject=News_subject,@News_content=News_content,@type=type,@FileName=Filename,@descriptions=description,@News_sources=News_Sources,@News_clicks=News_clicks,@News_author=News_author,@News_addtime=News_addtime,@show=show,@Thumbnail=Thumbnail,@width=width,@height=height,@titleColor=titleColor,@keywords=keywords from News where @News_ID=News_ID
return
end
go
数据库中 news_content 是text类型 News_ID为int主键自动增长 当保存存储过程的时候他要我声明news_content和New_id 求租这是为什么
没有错误啊
不会吧 错误170:第三行 “max”附近语法错误
必须声明变量@News_ID
必须声明变量@News_content
我的F5快按坏了 求助啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SQL code
{{----
相关问答:
我在学习使用SQL Server Compact Edition创建移动应用程序,可是在数据库创建发布第一步时提示错误如下:
There are no publications to which you subscribe,either because this server has no publicati ......
我在学做论坛
里面有个users表
表里有 experience(经验值) 和 rank(等级)俩列
我想使用QQ斗地主里面的等级制度
等级 需要经验
包身工 无
短工 10
......
SQL code:
begin tran
update EB with(rowlock) set Name='abc123' where Code=12 waitfor delay '00:00:13'
commit tran
我用rowlock想锁定一行,可是它把整个表都锁定了。不管我更新哪一条数据都 ......
先由如下sql语句
select A,B,C from table1
union
select A,B,C from table2
order by A, C asc
得到结果如下:
A B &nbs ......