[英]Problems with stored procedures
create procedure SpecialPrice(IN T_ID int,Discount_P Decimal(5,3))
Begin
Update Ticket
set Price=Price*Discount_P
where T_ID = Ticket_ID ;
End@
I want to create a stored procedure that will update discounted price on the table ticket however i am having trouble creating this stored procedure and it has error and since i am running these codes with IBM Data studio the displaye these errors beside Please Help 我想创建一个存储过程,该存储过程将更新票证上的折扣价,但是我在创建此存储过程时遇到了麻烦,并且出现错误,并且由于我正在使用IBM Data Studio运行这些代码,因此请在旁边显示这些错误,请帮助
The errors :
1)on the line Begin
DB2 for Linux, UNIX, and Windows: "Begin
Update Audience
set Price=Price*Discount_P
where T_ID = Ticket_ID" appears to be misplaced.
2) On the line END@
DB2 for Linux, UNIX, and Windows: Unexpected text "End@" encountered.
set the Statement Terminator from ;
从设置语句终止符
;
to @
in Data Studio, under the Editor field you find Validation. 到Data Studio中的
@
,在“编辑器”字段下找到“验证”。 There you can Change the Statement Terminator. 在那里您可以更改语句终止符。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.