Understanding the CockroachDB CAST Function

Introduction When you construct queries in CockroachDB, there may be times when it makes sense to convert a certain value to a different data type. For example, you may want to convert a numeric value stored as a string to an integer data type– doing this would allow you to perform calculations on the value. … Continued

Understanding the CockroachDB DROP TABLE Command

Introduction When you’re using CockroachDB to store your data, there may be times when you need to remove a table from your database. It’s important to know how to handle this task correctly, since deletions are permanent and cannot be undone. The CockroachDB DROP TABLE statement offers a simple way to delete a table from … Continued

Understanding the CockroachDB COALESCE Function

Introduction When you’re dealing with a list of values in CockroachDB, there’s a chance that some of those values may be NULL. The CockroachDB COALESCE function returns the first non-NULL expression in a list, offering a simple way to handle NULL values in your data. In this article, we’ll discuss the COALESCE() function and look … Continued

Understanding the CockroachDB ORDER BY Clause

Introduction If you want to get the most out of your CockroachDB query, you’ll probably want your results returned in a certain order. Sorting your query results makes them easier to read and can help you gain new insights into your data. The CockroachDB ORDER BY clause can be used to sort your returned records … Continued

Understanding the CockroachDB Data Types

Introduction If you want to harness the full power of CockroachDB, you’ll need to understand the various data types that can be used. It’s especially important to have a good understanding of CockroachDB data types when you’re defining the columns in a table. In this article, we’ll discuss the various CockroachDB data types and explain … Continued

Understanding CockroachDB Constraints

Introduction In CockroachDB, constraints are used to place certain restrictions on a column. These restrictions limit the values that can be inserted into the column. In this article, we’ll take a closer look at CockroachDB constraints and learn how to use them effectively. Prerequisites A few important prerequisites need to be in place before you … Continued

CockroachDB Join Expressions

Introduction When you need to write a query that combines rows from two or more tables, the JOIN operator offers a simple and powerful way to get the results you want. There are several types of JOIN expressions available to use in CockroachDB, and it’s important to understand the differences between them. In this article, … Continued

Understanding the CockroachDB Subquery

Introduction SQL subqueries allow for using the results of a selection query within, or inside, a larger query. In addition to scalar subqueries, found in a scalar expression, CockroachDB supports relational subqueries that appear as operand in a selection query, or a table expression. This tutorial will explain how to use the CockroachDB subquery by … Continued

The CockroachDB Alter Table Part 1

Introduction The ALTER TABLE statement in CockroachDB is used to make alterations to an existing table in Cockroach database. Using the CockroachDB alter table is a fast and easy method of changing data in an already existing table to add a new column to an existing table, add a constraint, drop the column’s constraint and … Continued

The CockroachDB Alter Table Part 2

Introduction This is part two in a tutorial series explaining how to use the CockroachDB alter table statement. Part one of this series explained how to use the basic CockroachDB alter table statement and provided a list of commonly used sub commands used to make alterations to an existing table. Part two of this series … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.