I need to output 3 null columns in my SQL statement, i'm using SQL developer Oracle 11g For example:
SELECT
c.CID,
c.CName,
null,
null,
null,
r.RegionID,
r.RegionName
FROM
Regions r
INNER JOIN Branch b ON b.RegionID = r.RegionID
INNER JOIN Countries c ON c.CID = b.CID;
So in the script output/query result window on SQL Developer shows
CID| CName | Null | Null | Null | RegionID | RegionName
------------------------------
C1 | ENG | Null | Null | Null | R1 | UK
C2 | ... | Null | Null | Null | R2 | ...
C3 | ... | Null | Null | Null | R3 | ...
What would be ideal is if i could do something like:
Select
Country,
Region,
Null as Continent,
Null as hemisphere
etc
I know this may sound bonkers but it's just for formatting purposes until the database is updated.
EDIT: Thanks for that, didn't realize it was so straight forward, the only issue is my null column is massive on the script output screen, even though it's empty, is there a way make it a more reasonable size?
Null as NameOfColumnworks perfectly.CASTtheNULLas, for example,VARCHAR2(1). Then it will take less space.