What do the $ and { } meaning in SQL?

huangapple go评论92阅读模式
英文:

What do the $ and { } meaning in SQL?

问题

可以有人解释一下在这个SQL中 $P{p_date} 的作用吗?我需要重建SQL查询,但不幸的是我的前同事没有对此进行任何注释。所以,我不理解下面的代码:

SELECT * FROM table_A A INNER JOIN table_B B ON (A.key = B.key AND A.date = $P{p_date});

我认为它可能是将日期值传递给Oracle,但我不确定。

英文:

can anyone explain $P{p_date} do in this SQL. I have to rebuild SQL query but unfortunately my previous coworker doesn't make any comment about it. So, I don't understand the code below:

SELECT * FROM table_A AINNER JOIN table_B BON (A.key = B.keyAND A.date = $P{p_date});

I think it maybe pass date value to in Oracle but I'm not sure.

答案1

得分: 1

这很可能来自于像Jasper Reports或类似的报表工具。

无论如何,它只是在说明这个查询将在运行时接收到一个来自用户的值,因此你的查询等同于:

SELECT *
FROM table_A A
INNER JOIN table_B B
ON (A.key = B.key AND A.date = <某个用户提供的值>);

英文:

That most likely comes from a reporting tool such as Jasper Reports or similar.

In any case, it is simply saying that this query will receive a value from a user at run time, thus your query is equivalent to:

SELECT * 
FROM table_A A 
INNER JOIN table_B B 
ON (A.key = B.keyAND A.date = &lt;some user provided value&gt;);

huangapple
  • 本文由 发表于 2023年8月9日 13:10:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/76864750.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定