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 (151)
  • 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)

Calculate the Number of Seconds Since a Particular Date/Time in SQLite

Posted on April 8, 2022 by Ian

If you need to calculate the number of seconds that have passed since a given date and time, you can use the UNIXEPOCH() function.

Note that this function was introduced in SQLite 3.38.0, so it will only work if you’re using SQLite 3.38.0 or later.

Continue reading →
SQLite dates, how to

INITCAP() – Convert to Initial Caps in PostgreSQL

Posted on April 8, 2022 by Ian

In PostgreSQL, we can use the initcap() function to format a string of text to use initial capitals. That is, it converts the first letter of each word to upper case and the rest to lower case.

Continue reading →
PostgreSQL functions, how to, psql, what is

2 Ways to Show All Databases in PostgreSQL (psql)

Posted on April 7, 2022 by Ian

Here are a couple of ways to show a list of databases when using psql with PostgreSQL.

The first option can be used when we’re already connected to PostgreSQL. The second option can be used when we don’t currently have a connection to Postgres.

Continue reading →
PostgreSQL how to, psql

Add Days to a Date in SQLite

Posted on April 7, 2022 by Ian

In SQLite, we can use the DATE() function to add a given number of days to a date.

If we’re dealing with datetime values, we can use the DATETIME() function.

Continue reading →
SQLite dates, how to

nullvalue: Show NULL Values in SQLite

Posted on April 6, 2022 by Ian

When using the SQLite command line interface (CLI), by default, whenever a query returns a null value, the output is the empty string ('').

We can change this by using the -nullvalue command line option when launching SQLite.

We can also use the .nullvalue dot command if we’re already in the SQLite CLI.

Continue reading →
SQLite how to

How to Convert to Uppercase in MariaDB

Posted on April 6, 2022 by Ian

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

We can alternatively use UCASE(), which is a synonym of UPPER().

Continue reading →
MariaDB how to

JSON Functions & Operators in SQLite (Full List)

Posted on April 5, 2022 by Ian

Below is a full list of JSON functions and JSON operators available in SQLite.

Continue reading →
SQLite functions, json, reference

How to Detect if a Value Contains at Least One Numerical Digit in MariaDB

Posted on April 5, 2022 by Ian

When working with MariaDB, you may occasionally find yourself needing to return all rows that contain at least one numerical digit.

In such cases, you may find the following example useful.

Continue reading →
MariaDB how to

How to Convert to Uppercase in SQLite

Posted on April 4, 2022 by Ian

In SQLite we can use the upper() function to convert lowercase characters to uppercase.

Continue reading →
SQLite how to

2 Ways to Return the Julian Day in SQLite

Posted on April 4, 2022 by Ian

Here are two methods for returning the Julian Day in SQLite.

The Julian Day is the fractional number of days since noon in Greenwich on November 24, 4714 B.C. It’s the continuous count of days since the beginning of the Julian period, and is used primarily by astronomers, and in software for easily calculating elapsed days between two events.

Continue reading →
SQLite dates, how to
  • «
  • 1
  • …
  • 142
  • 143
  • 144
  • 145
  • 146
  • …
  • 390
  • »

About Database.Guide | Privacy Policy