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 (132)
  • MariaDB (424)
  • Microsoft Access (17)
  • MongoDB (265)
  • MySQL (602)
  • NoSQL (8)
  • Oracle (301)
  • PostgreSQL (480)
  • Redis (210)
  • SQL (697)
  • SQL Server (1,169)
  • SQLite (298)

How TO_DAYS() Works in MariaDB

Posted on May 23, 2021September 5, 2021 by Ian

In MariaDB, TO_DAYS() is a built-in date and time function that returns the number of days from the start of the standard calendar (0000-00-00), based on a given date.

You pass the date to the function when you call it.

The TO_DAYS() function is the converse of the FROM_DAYS() function.

Continue reading →
MariaDB conversion functions, date functions, functions, what is

How FROM_DAYS() Works in MariaDB

Posted on May 23, 2021May 23, 2021 by Ian

In MariaDB, FROM_DAYS() is a built-in date and time function that returns a date value based on a given number of days from the start of the standard calendar (0000-00-00).

You pass the number of days to the function when you call it.

The FROM_DAYS() function is the converse of the TO_DAYS() function.

Continue reading →
MariaDB date functions, functions, what is

3 Ways to Get the Month Name from a Date in MariaDB

Posted on May 22, 2021June 19, 2021 by Ian

Here are three ways to return the month name from a date in MariaDB.

Continue reading →
MariaDB date format, dates, how to

How LAST_DAY() Works in MariaDB

Posted on May 22, 2021 by Ian

In MariaDB, LAST_DAY() is a built-in date and time function that returns the last day of the month for a given date.

It accepts one argument, which is the date for which you want to find the last day of the month.

Continue reading →
MariaDB date functions, functions, what is

Subtract a Month from a Date in MariaDB

Posted on May 21, 2021 by Ian

MariaDB provides several ways to perform arithmetic on dates. This includes adding or subtracting a month (or many months) from a given date.

Here’s an example of subtracting a month from a date in MariaDB.

Continue reading →
MariaDB dates, how to

How QUARTER() Works in MariaDB

Posted on May 21, 2021 by Ian

In MariaDB, QUARTER() is a built-in date and time function that returns the quarter from a given date expression.

It accepts one argument, which is the date you want to extract the quarter from.

It returns the quarter as a number in the range 1 to 4. For dates with zero months (e.g. 0000-00-00 or 2025-00-00), the result is 0.

Continue reading →
MariaDB date functions, functions, what is

2 Ways to Get the Default Language of a Login in SQL Server (T-SQL)

Posted on May 20, 2021 by Ian

There are (at least) a couple of ways you can use T-SQL to return the default language of a specified login in SQL Server.

In particular, you can use the following methods:

  • Query the LOGINPROPERTY() function.
  • Query the sys.server_principals system catalog view in the master database.

Examples of these are below.

Continue reading →
SQL Server how to, mssql, security, t-sql

How YEAR() Works in MariaDB

Posted on May 20, 2021 by Ian

In MariaDB, YEAR() is a built-in date and time function that returns the year from a given date expression.

It accepts one argument, which is the date you want to extract the year from.

It returns the year as a number in the range 1000 to 9999. For zero dates (e.g. 0000-00-00), the result is 0.

Continue reading →
MariaDB date functions, functions, what is

Rename a User Defined Data Type in SQL Server (T-SQL)

Posted on May 19, 2021 by Ian

In SQL Server, you can use the sp_rename stored procedure to rename a user created object in the current database, including a user-defined data type.

Continue reading →
SQL Server data types, how to, mssql

How WEEKOFYEAR() Works in MariaDB

Posted on May 19, 2021 by Ian

In MariaDB, WEEKOFYEAR() is a built-in date and time function that returns the calendar week of a given date as a number in the range from 1 to 53.

It’s the equivalent of using the WEEK() function in mode 3, and therefore its result is in accordance with ISO 8601:1988.

It accepts one argument; the date you want to extract the week from.

Continue reading →
MariaDB date functions, functions, what is
  • «
  • 1
  • …
  • 212
  • 213
  • 214
  • 215
  • 216
  • …
  • 388
  • »

About Database.Guide | Privacy Policy