Update database table-Stored Procedure

Source: Internet
Author: User
And also learned about the stored procedure. 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

Intitle = @ title,
Insummary = @ summary,
Inguests = @ guests,
Intime = @ time,
Inimgurl = @ imgurl
Where topicid = @ topic_id

Go

When updating data, you must clearly specify the type and length of the data item. If you do not specify the length, the system will take only the first character by default.
The data type and length must be consistent with the type length defined at the time of table creation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.