---
title: Quick Start Querying
slug: thVuw-oPjzOVdspFx_j7C
description: Get started with querying in Ocient data warehouse, covering the basics of SQL commands and efficient data retrieval practices.
docTags: 
createdAt: Thu Jul 21 2022 17:05:13 GMT+0000 (Coordinated Universal Time)
updatedAt: Mon Mar 30 2026 18:52:44 GMT+0000 (Coordinated Universal Time)
---

This example demonstrates a quick start to begin querying an Ocient® System.

## **Prerequisites**

To get started querying in Ocient, the following are required:

1. A valid username and password for your Ocient System — These credentials can be obtained from your Database Administrator or System Administrator.
2. Network access to the SQL Nodes and the IP Address of the Hostname of these nodes in the Ocient System.
3. The port used for SQL Nodes. By default, this is `4050`.
4. A SQL Client or SQL Driver — This example uses the Ocient JDBC Driver. See [Connect Using JDBC](<././Connect to Ocient/Connect Using JDBC.md>).

## Execute a Query

With these prerequisites, you can construct a connection string for your SQL Client of choice, connect, and begin querying Ocient in a few minutes. This example assumes the use of the JDBC driver and CLI. If using a different connection method, see [Connect to Ocient](<././Connect to Ocient.md>) to complete Step 2.

### Step 1: Create a Connection String

A connection string follows a standard format for Ocient.

```SQL
jdbc:ocient://<HOSTNAME_OR_IP_ADDRESS>:<PORT>/<DATABASE>
```

In this example, you are going to replace each of the placeholders with the following:

- PORT: `4050`
- HOSTNAME\_OR\_IP\_ADDRESS: `10.10.1.1`
- DATABASE: `system`

Some systems use a hostname like `sql1.example.com` instead of an IP Address. Additionally, if you have a database configured already, use that instead of `system` to access your tables.

The final connection string is:

```SQL
jdbc:ocient://10.10.1.1:4050/system
```

### Step 2: Connect

Start the JDBC CLI according to the instructions in [Connect Using JDBC](<././Connect to Ocient/Connect Using JDBC.md>). You need to specify a username and password.

The Fully Qualified Username is specified as `<username>@<database>`, so in your case, for a username of `example_user`, enter `example_user@system`.

Next, you should see an Ocient CLI prompt:

```shell
Ocient> _
```

Enter the connect statement using your connection string:

```shell
connect to jdbc:ocient://10.10.1.1:4050/system;
```

You receive a response similar to `Connected to to jdbc:ocient://10.10.1.1:4050/system` indicating that you are now connected.

### Step 3: Execute a Query

You can now query any user tables or system catalog tables to which you have access in the database. System Catalog tables provide a wealth of information about the underlying system and configuration. Because you are connected to the system database, you can begin with a few catalog queries.

At the Ocient prompt, enter this SQL statement that displays information for all tables in the system.

```sql
Ocient> SELECT * FROM information_schema.tables;
```

To filter this information, use the LIKE predicate.

```sql
Ocient> SELECT * FROM information_schema.tables WHERE table_name LIKE '%data%';
```

Now that you are connected, you can execute any SQL queries or perform Database Administrator operations like [Data Definition Language (DDL) Statement Reference](<././SQL Reference/Data Definition Language _DDL_ Statement Reference.md>) or [Data Control Language (DCL) Statement Reference](<././SQL Reference/Data Control Language _DCL_ Statement Reference.md>) where you have permission.

## Related Links

[General SQL Syntax](<./General SQL Syntax.md>)

[SQL Reference](<././SQL Reference.md>)
