In SQLite, we can use the DATE()
function to subtract one or more years from a date.
For datetime values, we can use the DATETIME()
function.
In SQLite, we can use the DATE()
function to subtract one or more years from a date.
For datetime values, we can use the DATETIME()
function.
If you’re getting an error that reads “ERROR 1250 (42000): Table ‘…’ from one of the SELECTs cannot be used in global ORDER clause” when using the UNION
clause in a MySQL query, it’s probably because you’re qualifying a column name with its table name.
This doesn’t work in MySQL.
To fix this issue, either remove the table name or use a column alias.
Continue readingThe +
operator allows us to add one or more days to a given date in PostgreSQL. We have a few options when it comes to specifying the actual number of days.
Here are eleven options for returning duplicate rows in Oracle Database when those rows have a primary key or some other unique identifier column and you want to ignore it.
Continue readingHere are examples of returning rows that contain non-alphanumeric characters in SQL Server.
Non-alphanumeric characters include punctuation characters like !@#&()–[{}]:;',?/*
and symbols like `~$^+=<>“
, as well as whitespace characters like the space or tab characters.
SQLite doesn’t have a DATEADD()
function like SQL Server (or an ADDDATE()
or ADD_DATE()
function like in some other DBMSs), but it does have the DATE()
function that can make additions to a date value.
SQLite also has a DATETIME()
function that can make additions to a datetime value (as well as a TIME()
function for time values).
Below are four ways to list out the tables in a MySQL database using SQL or the command line.
Continue readingHere are three options for returning rows that contain uppercase characters in SQLite.
Continue readingIf you’re getting error “1054 (42S22): Unknown column ‘…’ in ‘order clause'” when using the UNION
clause in MySQL, it could be because you’re trying to reference an aliased column by its column name.
We can subtract one or more days from a date in PostgreSQL with the -
operator.