Search code examples
oracle-databaseoracle10goracle11g

Oracle appending string to a select statement


I have a column in a oracle table Lic_num char(7 byte)

SELECT column1, 'ABC' + Lic_num
FROM TABLE One

I wanted ABC appended to all the rows that are returned with lic_num appended to it.

I tried tha above query and it is not working.


Solution

  • In Oracle it's:

    SELECT column1, 'ABC' || Lic_num
    FROM TABLE_ONE