gpt4 book ai didi

sql - SQLite中ANY关键字的替代

转载 作者:行者123 更新时间:2023-12-03 19:19:19 25 4
gpt4 key购买 nike

我需要在SQLite中执行查询,但是由于SQLite不支持ANY关键字,是否有任何替代查询会产生相同的结果。

以下是我要在SQLite中执行的查询:

select * from ORDERsy 
where amount < any(select amount from ORDERsy where odate = '06-oct-1999');

最佳答案

您可以使用MAX

select * 
from ORDERsy
where amount < (select MAX(amount) from ORDERsy where odate = '06-oct-1999');



ALL, ANY and SOME Comparison Conditions in SQL

“ x

关于sql - SQLite中ANY关键字的替代,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49720431/

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