The following variation is more efficent (particulary if your ID is not indexed), as it stops searching as soon as it finds the first occurence of the matching record (in your case it continues the search until there is no more matching records):

create or replace trigger insert_record
before insert on table
for each row
declare
v_dummy varchar2(1);
begin
select null into v_dummy from table
where id = :new.id
AND ROWNUM = 1;
raise_application_error (-20507 , 'Sorry .......');
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
end;