The problem has nothing to do with print
being a keyword (it isn't, by the way, though it is a SQL*Plus command). The problem is that adding an additional column to your projection (the set of columns in your SELECT
list) will never "overwrite" another column in the projection even if you try to name them the same. If you want to force the value of PRINT
to be 'TRUE'
, you'd need to explicitly list the columns that you want (other than PRINT
) and then add your computed PRINT
column.
In other words
SELECT h.col1, h.col2, h.col3, ... h.colN,
'TRUE' as print
FROM table_name h
where col1
- colN
omits the PRINT
column