gpt4 book ai didi

postgresql - Postgres 数学 : Operator does not exist: bigint == integer

转载 作者:行者123 更新时间:2023-12-03 08:15:02 24 4
gpt4 key购买 nike

我有以下sql:

create table gps (laf int, "timestamp" timestamp);
select * from
(select *, row_number() over() from gps) as yo
where row_number == 10

但它会产生这样的响应:

ERROR: operator does not exist: bigint == integer Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Position: 84

类型转换似乎没有帮助。如何将 row_number(bigint)与数字进行比较?

最佳答案

似乎我陷入了编程领域,我需要 = 而不是 ==,但在这里发布是为了后代和谷歌:

select * from 
(select *, row_number() over() from gps) as yo
where row_number = 0

关于postgresql - Postgres 数学 : Operator does not exist: bigint == integer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69680836/

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