In PostgreSQL, we can use the - operator to subtract one or more months from a date.
Object-Relational
2 Ways to Convert to Uppercase in Oracle
Below are two functions that convert lowercase characters to their uppercase equivalent in Oracle Database.
Both functions work in a similar way, but with a minor difference.
How to Return the Unix Timestamp in Oracle
Here’s an option for returning the Unix timestamp when using Oracle Database.
The Unix timestamp (also known as Unix Epoch time, Unix time, or POSIX time) is the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC).
2 Ways to Get the Number of Days in a Month in Oracle
Here are a couple of ways to return the number of days in a given month in Oracle Database. This could be the number of days in the current month, or the number of days in a month based on a specified date.
Fix “INSERT has more expressions than target columns” in PostgreSQL
If you encounter an error that reads “INSERT has more expressions than target columns” when trying to insert data in Postgres, it’s because you’re trying to insert data into more columns than the table actually contains.
Subtract Minutes from a Time Value in PostgreSQL
In PostgreSQL, we can use the - operator to subtract one or more minutes from a time value.
By “time” value, this could be an actual time value, a timestamp, or an interval. We can also subtract minutes from a date value or a date and time combination.
How to Get the Last Day of the Month in Oracle
In Oracle Database we can use the LAST_DAY() function to return the last day of a given month. This can be the last day of the current month or the last day of month based on a specified date.
Get the Number of Days in a Month in PostgreSQL
Here’s an example of using PostgreSQL to return the number of days in a month, based on a given date.
UPPER() – Convert to Uppercase in PostgreSQL
In PostgreSQL, we can use the upper() function to convert lowercase characters to their uppercase equivalent, according to the rules of the database’s locale.