Skip to content

SQL Bits

You're here to find quick SQL recipes.

  • Home
  • Topics
    • Generic SQL
    • PostgreSQL
    • MariaDB
    • MySQL
    • Oracle
    • SQL Server
    • Db2
    • Informix
    • SQLite
  • Advertising
  • Write
  • About

Category: Oracle

Comments on database objects

Why and how to write comments on database, tables, and other objects on most DBMSs. How to read comments.

Continue reading Comments on database objects
Published August 9, 2021
Categorized as Db2, Generic SQL, Oracle, PostgreSQL Tagged level-intermediate

Find Oracle version and edition

How to know Oracle edition and version number in use for this instance.

Continue reading Find Oracle version and edition
Published July 30, 2021
Categorized as Oracle Tagged level-beginner

Oracle: Send alerts via email

Sometimes we want to send an email when something suspicious happens in a database. Oracle is able to natively send emails.

Continue reading Oracle: Send alerts via email
Published July 27, 2021
Categorized as Oracle Tagged level-expert

Find the maximum text length in a column

How to get the length of the longest text in a column. Including Db2 specific syntax.

Continue reading Find the maximum text length in a column
Published July 24, 2021
Categorized as Db2, Generic SQL, Informix, MariaDB, Oracle, PostgreSQL, SQL Server Tagged level-beginner

Create a cross-table unique ID

Most tables are created with a unique, progressive ID. But how to create an ID whose values are unique across multiple tables? For example, if value 1 is in table A, it must not be in table B.

Continue reading Create a cross-table unique ID
Published July 23, 2021
Categorized as Db2, Generic SQL, Informix, MariaDB, Oracle, PostgreSQL, SQL Server Tagged level-intermediate
  • Twitter
  • Email
SQL Bits
Proudly sponsored by Vettabase.