Reputation: 5
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
Reputation: 35323
Use single quotes '
rather than double "
and your query should work.
SELECT CustomerName, 'Big' AS Round FROM Customers;
Upvotes: 2