展开全部
any表示任意一个,all表示所有的。举例如下:
1、创建测试表,create table test_any_all(id number);
2、在test_any_all 表中插入测试数据;62616964757a686964616fe78988e69d8331333433623136
insert into test_any_all values(5);
insert into test_any_all values(15);
insert into test_any_all values(25);
insert into test_any_all values(30);
commit;
3、查询表中全量数据;select t.*, rowid from test_any_all t;
4、编写语句,用any表达式,查询表中大于10,18,28三个数字中任意一个数据即可;
select t.*, rowid sec from test_any_all t where id > any(10,18,28);
5、编写语句,用all表达式,查询表中大于10,18,28三个数字中最大数字的所有数据;
select t.*, rowid sec from test_any_all t where id > all(10,18,28);