Halifernus
Halifernus

Reputation: 5

Add a column to a PL SQL report that has default data in it

I want to add a column to a PL SQL query but the syntax is different than SQL and I am not sure how to do it. In SQL I could use:

SELECT CustomerName,"Big" AS Round FROM Customers;

And using the now famous northwind database this would result:

CustomerName / Round

Alfred / Big

But if I use this same syntax in PL SQL it results in a

"ORA-00904: "Big": invalid identifier" error.

How do I create this column and populate it with the data I require?

Upvotes: 0

Views: 63

Answers (1)

xQbert
xQbert

Reputation: 35323

Use single quotes ' rather than double " and your query should work.

SELECT CustomerName, 'Big' AS Round FROM Customers;

Upvotes: 2

Related Questions