如何使用变量(Oracle)的操作员喜欢运算符
你能告诉我怎么能|在Oracle 语句中传递变量?
这是PLSQL:
declare
variables VARCHAR2 (200):= 'exemple';
V1 integer ;
BEGIN
select COUNT(*)into V1 from user_source
where name LIKE '%'+variables+'%'
;
DBMS_OUTPUT.PUT_LINE(V1);
END;
PS:我需要在类似SQL语句中使用%。这不仅仅是:像变量的名称一样,百分比运算符是必要的! 谢谢您的帮助!
Can you please tell me how can | pass variable in an oracle LIKE
statement?
here is the plsql :
declare
variables VARCHAR2 (200):= 'exemple';
V1 integer ;
BEGIN
select COUNT(*)into V1 from user_source
where name LIKE '%'+variables+'%'
;
DBMS_OUTPUT.PUT_LINE(V1);
END;
PS : i need to use the % in the like sql statement. it's not just : where name LIKE variables the % operator is necessary !
thank you for the help !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
像这样:
Like this:
连接或使用
instr
函数:Concatenate, or use
INSTR
function: