I am trying to do something like this:
SELECT 'John Doe' example_name;
Result:
example_name
John Doe
I can do this in PostgreSQL and SQL Server, but this does not work in Oracle.
Any suggestions?
I am trying to do something like this:
SELECT 'John Doe' example_name;
Result:
example_name
John Doe
I can do this in PostgreSQL and SQL Server, but this does not work in Oracle.
Any suggestions?
Prior to version 23c, Oracle requires you to use the DUAL table when synthesising table data from values:
This works for me in Oracle 11g R2 on SQLFiddle.com:
SELECT
'John Doe' AS example_name
FROM
dual;
Screenshot proof: