,又学了点关于存储过程的知识
CREATE PROCEDURE HVC_ChatRoom_UpdateTopic
(
@topic_id int,
@title nvarchar(255),
@summary nvarchar(2000),
@time datetime,
@guests nvarchar(255),
@imgurl nvarchar(255)
)
AS
UPDATE HVC_ChatRoom_TopicsList
SET
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
inTitle = @title,
inSummary = @summary,
inGuests = @guests,
inTime = @time,
inImgUrl = @imgurl
WHERE TopicId = @topic_id
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
GO
update数据时一定要把数据item的类型和长度写清楚,要是不写长度,系统会默认只取第一个字符。
数据的类型和长度要和当初建表时定义的类型长度一致。
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
数据的类型和长度要和当初建表时定义的类型长度一致。