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

Db2: How to create IDENTITY columns

Db2 supports the IDENTITY keyword to create autoincremental columns. Several options are available.

Continue reading Db2: How to create IDENTITY columns
Published November 7, 2021
Categorized as Db2 Tagged level-intermediate

PostgreSQL: Change passwords

Let’s see how to change a user’s password or your own password in PostgreSQL. We’ll also discuss how to avoid sending the password in clear over a network.

Continue reading PostgreSQL: Change passwords
Published October 30, 2021
Categorized as PostgreSQL Tagged level-intermediate

MariaDB CRUD operations Hello World

Let’s see a slightly elaborated “Hello world”, to demonstrate the most common SQL operations with MariaDB: creating a database and a table, inserting a row, reading it, modifying it, deleting it.

Continue reading MariaDB CRUD operations Hello World
Published October 30, 2021
Categorized as MariaDB Tagged level-beginner

SQL Server: Concatenate strings (NULL-safe)

There are several ways to concatenate strings in SQL, and they mainly differ in how they handle NULL values.

Continue reading SQL Server: Concatenate strings (NULL-safe)
Published October 24, 2021
Categorized as SQL Server Tagged level-beginner

Creating UNSIGNED columns in SQL Server

Some DBMSs, like MariaDB and MySQL, allow to create UNSIGNED columns. SQL Server doesn’t support unsigned integers. Let’s see what we can do instead.

Continue reading Creating UNSIGNED columns in SQL Server
Published October 22, 2021
Categorized as SQL Server Tagged level-intermediate

PostgreSQL: Tables without columns

PostgreSQL allows to create, read and write tables without columns. Let’s see how to work with them, and whether they can have practical uses.

Continue reading PostgreSQL: Tables without columns
Published October 20, 2021
Categorized as PostgreSQL Tagged level-beginner

Db2: Stored procedures examples in SQL

Simple examples of SQL stored procedures in Db2.

Continue reading Db2: Stored procedures examples in SQL
Published October 17, 2021
Categorized as Db2 Tagged level-expert

PostgreSQL: Check which privileges a user has on a table

Let’s see how to check what a user can do with a certain PostgreSQL table, or which users have a certain permission on a table.

Continue reading PostgreSQL: Check which privileges a user has on a table
Published October 16, 2021
Categorized as PostgreSQL Tagged level-expert

MariaDB: Rollback the transaction if a warning occurs

In MariaDB most errors cause the current transaction to rollback, but warnings don’t. This article shows how to rollback when a warning happens.

Continue reading MariaDB: Rollback the transaction if a warning occurs
Published October 13, 2021
Categorized as MariaDB Tagged level-intermediate

SQL Server: Handle errors

SQL Server allows to handle errors with TRY ... CATCH blocks, and provides several statements to get information about the error that is being handled.

Continue reading SQL Server: Handle errors
Published October 9, 2021
Categorized as SQL Server Tagged level-intermediate

Posts navigation

Newer posts Page 1 Page 2 … Page 7 Older posts
  • Twitter
  • Email
SQL Bits
Proudly sponsored by Vettabase.