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

Category: Oracle

How to Get the Short Month Name in SQL

Posted on October 27, 2021 by Ian

Below are examples that demonstrate how to use SQL to return the short month name from a date in the major RDBMSs.

Continue reading →
MariaDB, MySQL, Oracle, PostgreSQL, SQL Server date format, how to

2 Functions that Get the Day, Month, and Year from a Date in Oracle

Posted on October 24, 2021 by Ian

Oracle Database has the TO_CHAR(datetime) function that enables us to get various date parts from a datetime value.

There’s also the EXTRACT(datetime) function that extracts a specific datetime unit (e.g. day, month, year, etc).

Continue reading →
Oracle date format, dates, how to

2 Ways to Format your Query Results in SQLcl (Oracle)

Posted on October 23, 2021 by Ian

When using SQLcl to run queries against Oracle Database, you can specify the output of the query results using the following two options:

  • The SET SQLFORMAT command
  • Add a comment shortcut to your query
Continue reading →
Database Tools, Oracle how to, sqlcl

How to Format Numbers with a Minus/Plus Sign in Oracle

Posted on October 21, 2021 by Ian

When using the TO_CHAR() function to format a number in Oracle Database, you can use the S format element to return its sign (i.e. a plus sign for positive values, and a minus sign for negative values).

You can also use the MI format element to return negative values with a trailing negative sign, and positive values with a trailing blank.

Continue reading →
Oracle how to, number format

Export Query Results to an XML File when using SQLcl (Oracle)

Posted on October 19, 2021January 31, 2023 by Ian

When using SQLcl with Oracle Database, you can export your query results to an XML file with the SPOOL command.

Continue reading →
Oracle export, how to, sqlcl, xml

Get the Month Name from a Date in SQL

Posted on October 13, 2021October 13, 2021 by Ian

Most major RDBMSs provide at least one function that enables us to return the month name from a date.

Continue reading →
Azure SQL Edge, MariaDB, MySQL, Oracle, PostgreSQL, SQL, SQL Server date format, dates, how to

2 Ways to Concatenate a String and a Number in Oracle

Posted on October 11, 2021 by Ian

In Oracle Database, we can concatenate strings and numbers with the CONCAT() function or the pipe concatenation operator (||).

Continue reading →
Oracle how to

How to Format Numbers in Oracle

Posted on October 7, 2021 by Ian

In Oracle Database, you can format numbers in many ways.

For example, you can format a number as a currency, with commas and decimal points in the right place. You can specify leading zeros, you can add a fractional part – or remove it, if that’s what’s required.

Continue reading →
Oracle how to, number format

Return the Short Day Name from a Date in Oracle

Posted on October 5, 2021 by Ian

In Oracle Database, we can use the TO_CHAR(datetime) function to return the various date parts from a datetime value, including the short day name.

The short day name is also referred to as the abbreviated day name. In any case, below are examples of returning the short day name from a date value in Oracle.

Continue reading →
Oracle date format, dates, how to

List of Territories Supported by Oracle Database

Posted on October 4, 2021 by Ian

Below is a list of territories that are supported by Oracle Database. These can be used when setting the NLS_TERRITORY initialization parameter.

Continue reading →
Oracle reference
  • «
  • 1
  • …
  • 10
  • 11
  • 12
  • 13
  • 14
  • …
  • 31
  • »

About Database.Guide | Privacy Policy