gpt4 book ai didi

POSTGRESQL - 返回选择查询时出错

转载 作者:行者123 更新时间:2023-11-29 13:21:18 27 4
gpt4 key购买 nike

<分区>

这是我的函数,执行这个函数时返回错误:

create or replace function country(varchar) 

returns customer(customer_id integer,
first_name varchar,
last_name varchar) as $$


select customer_id, customer.first_name, customer.last_name

from customer

inner join address on customer.address_id = address.address_id
inner join city on address.city_id = city.city_id
inner join country on city.country_id = country.country_id

where country = '$1';

$$
language sql;

返回查询时出错。

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