Skip to content

Database.Guide

how to

Add a Virtual Column to an Existing Table in Oracle

September 27, 2022 by Ian

If we need to add a virtual column to an existing table in Oracle Database, we can do so with the usual SQL ALTER TABLE statement.

Read more

Categories Oracle Tags computed columns, how to

Fix “ERR wrong number of arguments for ‘sintercard’ command” in Redis

September 24, 2022 by Ian

If you’re getting an error that reads “ERR wrong number of arguments for ‘sintercard’ command” in Redis, it’s because you’re calling the SINTERCARD command with the wrong number of arguments.

To fix this issue, make sure you’re passing the correct number of arguments.

Read more

Categories Redis Tags errors, how to

How to Convert to Lowercase in MariaDB

September 22, 2022 by Ian

In MariaDB, we can use the LOWER() function to convert uppercase characters to their lowercase equivalent.

We can alternatively use LCASE(), which is a synonym of LOWER().

Read more

Categories MariaDB Tags how to

How to Set an Expiry Only When the New Expiry is Less Than the Existing Expiry in Redis

September 19, 2022 by Ian

When setting a timeout on a key in Redis, we have the option of setting the timeout only if it’s less than the existing timeout. We can do this with the LT option of commands such as EXPIRE, EXPIREAT, PEXPIRE, and PEXPIREAT.

Read more

Categories Redis Tags how to

Subtract Seconds from a Time Value in PostgreSQL

September 18, 2022 by Ian

In PostgreSQL, we can use the - operator to subtract one or more seconds from a time value.

By “time” value, this could be an actual time value, a timestamp, or an interval. We can also subtract seconds from a date value or a date and time combination.

Read more

Categories PostgreSQL Tags dates, how to, psql

How to Return a Key’s Value and Set its Expiry in a Single Operation in Redis

September 17, 2022 by Ian

In Redis, typically when we want to return a key’s value, we use the GET command. But there’s also a GETEX command (introduced in Redis 6.2.0) that allows us to get the value and return it’s expiry at the same time.

Read more

Categories Redis Tags how to, string

5 Ways to See if a Table has a Generated Column in MySQL

February 10, 2024September 15, 2022 by Ian

MySQL supports generated columns. If you’re not sure whether a table has a generated column or not, you can check it using any of the following methods.

Read more

Categories MySQL Tags computed columns, how to

How to Return the Expiry Time as a Unix Timestamp in Redis

September 13, 2022 by Ian

In Redis, we have several options for returning the expiry time of a key. One option from Redis 7.0.0 and above is to return it as a Unix timestamp.

When returning the expiry as a Unix timestamp, we can have it returned in seconds or milliseconds. To return it in seconds, we can use the EXPIRETIME command. To return it in milliseconds, we can use the PEXPIRETIME command.

Read more

Categories Redis Tags how to

2 Ways to Set a Redis Key Only When it Doesn’t Already Exist

September 12, 2022 by Ian

In Redis, it’s possible to set a key only if it doesn’t already exist. As with most things, there’s more than one way to do this.

Read more

Categories Redis Tags how to

How to Set an Expiry Only When the New Expiry is Greater Than the Existing Expiry in Redis

September 11, 2022 by Ian

Redis 7.0.0 introduced some potentially useful options for setting timeouts on keys. One of these is the GT option, which allows us to set the expiry only if the new expiry is greater than the existing one.

The GT option is available for commands such as EXPIRE, EXPIREAT, PEXPIRE, and PEXPIREAT.

Read more

Categories Redis Tags how to
Older posts
Newer posts
← Previous Page1 … Page86 Page87 Page88 … Page201 Next →

About | Privacy Policy

© 2026 Database.Guide • All rights reserved