gpt4 book ai didi

mysql - 将子查询作为函数参数传递

转载 作者:行者123 更新时间:2023-11-29 06:04:26 26 4
gpt4 key购买 nike

如何将子查询用作函数参数

 select  get_feeTypeamount(SELECT ftp.type_plan_id 
FROM tbl_fee_type_plan ftp
WHERE ftp.type_plan_id=17) as total_amount

最佳答案

您不需要子查询。只需将该函数应用于 SELECT 中的 ftp.type_plan_id 列即可。

像这样的东西应该适合你:

SELECT get_feeTypeamount(ftp.type_plan_id) as total_amount 
FROM tbl_fee_type_plan ftp
WHERE ftp.type_plan_id=17

关于mysql - 将子查询作为函数参数传递,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42629681/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com