------解决方案-------------------- 10g及以上适用: select * from (select t.*, row_number() over(partition by number,name) rn from table t where regexp_like(name,'^123') ) where rn = 1;
------解决方案-------------------- create table mytable (my_number varchar2(16), my_name varchar2(16));
select * from mytable x where my_number like '123%' and rowid = (select min(rowid) from mytable where my_number=x.my_number and my_name=x.my_name);
------解决方案--------------------
------解决方案--------------------
------解决方案-------------------- 顶楼上的 LIKE 123开头的可以用到索引的
------解决方案--------------------