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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Using calculated column names in SELECT query

Vysakh Suresh - 3035408Apr 13 2016 — edited Apr 14 2016

Dear All,

I created a table test_table_1..

CREATE TABLE test_table_1(col_1_val NUMBER(20));

Inserted values into it..

INSERT INTO test_table_1

VALUES (1);

We can select value from table as..

SELECT col_1_val

FROM test_table_1;

pastedImage_59.png

To get the same output, Can we select the column name col_1_val from test_table_1 like..

SELECT col_<an expression/formula which evaluates to result 1>_val

FROM test_table_1;

Thanks and Regards,

Vysakh Suresh

This post has been answered by odie_63 on Apr 14 2016
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 12 2016
Added on Apr 13 2016
22 comments
63,710 views