Display Oracle month without space padding

When attempting to display a full month in Oracle, it adds spaces by default, up to the length of the maximum month.

This occurs when using

to_char(sysdate, 'Month')

You could wrap that with a trim function call, or you could use

to_char(sysdate, 'fmMonth')

 

Select historical data from a table using flashback

Select from a table at a certain point in history. This can be useful if you have made a mistake and edited or deleted data. Be careful though, because you have to have flashback enabled, and also set with enough space to capture all the changes that you need to recover.

Any DDL on the table will reset the ability to flashback.

example time_units
Day 1
Hour 1/24
Minute 1/1440
Second 1/86400

SELECT *
FROM TABLE_NAME
AS OF TIMESTAMP SYSDATE - time_unit;