Technical requirements
We will need at least a single-node CockroachDB cluster to try some of the queries discussed in this chapter. So, please refer to the Technical requirements section of Chapter 2, How Does CockroachDB Work Internally?
If you want to try this on a larger CockroachDB cluster, then please refer to the Working example of fault tolerance at play section of Chapter 5, Fault Tolerance and Auto-Rebalancing, where we create a six-node cluster.
Also, if you are not sure about some SQL operations and how to use them, you can just use the CockroachDB Help option to get more information.
For example, if you want to know about all the options available with CREATE TABLE
, you can just try \h CREATE TABLE
in the SQL client console, as shown in the following code snippet:
root@localhost:26258/test> \h CREATE TABLE
You can try \h
with any of the commands to get more detailed information.
In the first section, we will learn about DDL statements.