1

When working with Oracle is it possible to select multiple columns at once and assign them each an alias? I have Googled around but can't seem to come up with a straight answer. An example of what I want to do would be something like:

SELECT prod_id, prod_name AS "Product ID", "Product Name" FROM tbl_products

When I run this I get the error: ORA-00904: "Product Name": invalid identifier

Any advice?

1 Answer 1

1

I think you mean like this:

SELECT prod_id AS "Product ID", prod_name AS "Product Name" FROM tbl_products
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the quick reply - I feel like such an idiot with the solution being so simple!
No problem. Glad to help:P. Remember to accept the answer if you are fine with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.