问题描述
- db2使用用户自定义函数时报错
- 自定义函数如下:
create function a(@sno char(6))
returns table(couname char(20)score int )
language sql
reads sql data
no external action
deterministic
return
(select cnamescore from gradecourse where grade.sno=@sno and grade.cno=course.cno);调用语句如下:select a('990101')
报错信息如下:
An unexpected token ""END-OF-STATEMENT"" was found following ""select a('990101')"". Expected tokens may include: """".. SQLCODE=-104 SQLSTATE=42601 DRIVER=4.7.89函数已经成功创建了,我应该如何调用呢?
时间: 2024-12-27 00:19:15