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!

Append string to each column value

John_75Oct 29 2012 — edited Oct 29 2012
Version:11.2

create table test1 (name1 varchar2(10));

insert into test1 values ('JUPITER');
insert into test1 values ('EARTH');
insert into test1 values ('MARS');
insert into test1 values ('VENUS');
commit;

SQL> select * from test1;

NAME1
----------
JUPITER
EARTH
MARS
VENUS
For each values of this table, I want three rows to be returned with the string
JUPITER is a planet
JUPITER is almost round
JUPITER revolves around the sun
EARTH is a planet
EARTH is almost round
EARTH revolves around the sun
MARS is a planet
MARS is almost round
MARS revolves around the sun
.
.
.
Any idea how I could do this ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2012
Added on Oct 29 2012
3 comments
484 views