SELECT * should not be used
ZPA rule for PL/SQL and Oracle SQL · SelectAllColumns
SELECT * returns whatever columns the tables have when the statement runs. Code that reads the result into variables or by position breaks, or reads the wrong column, when a column is added, removed or reordered. It also fetches columns nobody uses, and hides from the reader which data the code depends on.
This rule reports * and table.* in a select list. It is not reported where the whole row is the point: in an EXISTS subquery, in a SELECT ... INTO whose target may be a record of the row, and in a cursor fetched into such a record.
Examples
declare
cursor c_racks is
select * -- Noncompliant
from rack;
begin
for r in c_racks loop
refresh_rack(r.id);
end loop;
end;
declare
cursor c_racks is
select id
from rack;
begin
for r in c_racks loop
refresh_rack(r.id);
end loop;
end;