select count(*) from item_resource_bind_his;
select nvl(max(key), 1) key from item_resource_bind_his;
select nvl(max(key), 1) key
from item_resource_bind_his t
where clear_date_time is null
group by item, so_line_num, so_num, wbs_num;
重新做个测试
-- Create table
create table TEST
(
id NUMBER,
name NVARCHAR2(111)
)
;
-- Add comments to the columns
comment on column TEST.id
is '排序';
comment on column TEST.name
is '姓名';
INSERT INTO TEST(ID, NAME)VALUES(1, '张三');
INSERT INTO TEST(ID, NAME)VALUES(2, '李四');
select * from TEST t
select max(id) id from test where id = 3
标签:group,item,Max,单独,num,key,TEST,id,select From: https://www.cnblogs.com/hlm750908/p/17105092.html