Answer the question
In order to leave comments, you need to log in
Oracle: how to populate an attribute with random IDs from another table?
(select * from (SELECT OWNER_ID FROM NEW_OWNER
ORDER BY dbms_random.value)
where rownum = 1);
update new_hill set owner_id = (select * from (SELECT OWNER_ID FROM NEW_OWNER
ORDER BY dbms_random.value)
where rownum = 1) where rownum <= 1;
Answer the question
In order to leave comments, you need to log in
update new_hill
set owner_id = (select owner_id from new_owner sample(0.001) where rownum = 1)
where rownum <= 1;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question