Database.Guide

Skip to content

Beginners

  • What is a Database?
  • Database Tutorial

SQL

  • SQL Tutorial
  • SQL Reference
  • SQL Joins Tutorial
  • SQL Transactions Tutorial
  • Basic SQL Queries

Categories

  • Azure SQL Edge (17)
  • Database Concepts (99)
  • Database Tools (72)
  • DBMS (9)
  • DuckDB (146)
  • MariaDB (424)
  • Microsoft Access (17)
  • MongoDB (265)
  • MySQL (602)
  • NoSQL (8)
  • Oracle (301)
  • PostgreSQL (480)
  • Redis (210)
  • SQL (697)
  • SQL Server (1,170)
  • SQLite (299)

Tag: how to

5 Ways to Check if a Table has a Generated Column in MariaDB

Posted on October 5, 2022 by Ian

Here are five ways to see whether a table contains a generated column in MariaDB.

Continue reading →
MariaDB computed columns, how to

Fix “ERR syntax error” when using the SISINTERCARD Command in Redis

Posted on October 3, 2022 by Ian

If you’re getting an error that reads “ERR syntax error” when using the SINTERCARD command, it could be because your first argument is too low.

If this is the case, you can easily fix the issue by making sure that the first argument reflects the actual number of sets that you’re comparing.

Continue reading →
Redis errors, how to

Fix: “ERR Number of keys can’t be greater than number of args” when using the SINTERCARD Command in Redis

Posted on September 29, 2022 by Ian

If you’re getting an error that reads “ERR Number of keys can’t be greater than number of args” when using the SINTERCARD command, it’s probably because your first argument is the wrong value.

To fix this issue, make sure the first argument reflects the number of sets that you’re comparing.

Continue reading →
Redis errors, how to

Add a Virtual Column to an Existing Table in Oracle

Posted on 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.

Continue reading →
Oracle computed columns, how to

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

Posted on 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.

Continue reading →
Redis errors, how to

How to Convert to Lowercase in MariaDB

Posted on 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().

Continue reading →
MariaDB how to

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

Posted on 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.

Continue reading →
Redis how to

Subtract Seconds from a Time Value in PostgreSQL

Posted on 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.

Continue reading →
PostgreSQL dates, how to, psql

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

Posted on 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.

Continue reading →
Redis how to, string

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

Posted on September 15, 2022February 10, 2024 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.

Continue reading →
MySQL computed columns, how to
  • «
  • 1
  • …
  • 65
  • 66
  • 67
  • 68
  • 69
  • …
  • 181
  • »

About Database.Guide | Privacy Policy