2017-02-23 72 views
0
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 ; 

[email protected] 

我想创建但是我无法创建该存储过程将更新打折放在桌上门票价格一个存储过程,它的主要错误,因为我正在运行与IBM Data Studio的这些代码在displaye这些错误旁边请帮助使用存储过程的问题

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 [email protected] 
    DB2 for Linux, UNIX, and Windows: Unexpected text "[email protected]" encountered. 

回答

1

设置语句终结者从;@在Data Studio中,编辑栏中 下你发现验证。在那里你可以改变语句终结者。

+1

或者你可以键入 - #SET TERMINATOR @ – jmueller