Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Appending column value of one table to another table

Albert ChaoNov 16 2021
CREATE TABLE tab_risk (
    prod_id      NUMBER(10),
    prod_name    VARCHAR2(30),
    prod_filter  VARCHAR2(30),
    constraint pk_tab_risk primary key (prod_id)
);

insert into tab_risk values(1,'a','Falcon');
insert into tab_risk values(2,'b','Cars');
insert into tab_risk values(3,'c','Powerpoint');
insert into tab_risk values(4,'d','Zone');

CREATE TABLE ref_filter (
    add_in_filter VARCHAR2(30)
);

insert into ref_filter values('Powerpoint');
insert into ref_filter values('Word');
insert into ref_filter values('Email');

I need to append the ref_filter data to a particular prod_id. But I am wondering how this can be done or is this possible or not? Like for prod_id 1 currently, prod_filter is 'Falcon' but when I select
prod_id 1 it should give me 'Falcon', 'Powerpoint', 'Word', and 'Email'. And likewise for prod_id 2 and so on. Is there any way to achieve this?

This post has been answered by tsangsir on Nov 17 2021
Jump to Answer
Comments
Post Details
Added on Nov 16 2021
9 comments
2,143 views