declare
v_flag int:=0;
begin
select count(distinct column) into v_flag
from table1;
if v_flag=1 then
dbms_output.put_line('same value');
else
dbms_output.put_line('has deffernet values');
end if;
end ;
SELECT COUNT(DISTINCT COLUMN) INTO FLAG FROM TABLE ;
IF FLAG=1 THEN
相同;
end if;