Jump to main content
Index
Advanced search
  1. Home
  2. QNX Software Development Platform

    QNX SDP is a cross-compiling and debugging environment, including an IDE and command-line tools, for building binary images and programs for target boards running QNX Neutrino 7.1.

  3. OS Components & Operations

  4. QDB Developer's Guide
  5. QDB SQL Reference

    QDB supports a subset of ANSI SQL-92.

  6. Statements

    QDB recognizes more than 20 types of SQL statements that create, modify, and delete tables, indexes, and triggers, and perform specialized tasks such as database cleanup.

  • QNX Momentics IDE User's Guide

    This User's Guide describes version 7.1 of the Integrated Development Environment (IDE) that's part of the QNX Momentics tool suite.

  • QNX Software Development Platform

    QNX SDP is a cross-compiling and debugging environment, including an IDE and command-line tools, for building binary images and programs for target boards running QNX Neutrino 7.1.

    • Quickstart Guide

    • OS Components & Operations

      • Adaptive Partitioning User's Guide

      • Boot Optimization Guide

        The Boot Optimization Guide describes techniques you can use to reduce the time from your board's initial power on until you have a fully functional QNX system running on the board.

      • Building Embedded Systems

        The Building Embedded Systems guide is intended for developers who are developing or building BSPs for QNX Neutrino RTOS embedded systems.

      • Core Networking Stack User's Guide

        This guide introduces you to the QNX Neutrino Core Networking stack and its manager, io-pkt.

      • Customizing a BSP

        While QNX provides Board Support Packages (BSPs) for many common platforms and their individual variants, in some cases, you need a BSP for a board that QNX does not provide. If this is the case, you can modify a QNX BSP or develop your own.

      • Device Publishers Developer's Guide
      • High Availability Framework Developer's Guide
      • High-Performance Networking Stack (io-sock) User's Guide

        This guide contains instructions for implementing and using the QNX Neutrino High-Performance Networking Stack and its manager, io-sock.

      • Instant Device Activation
      • Migrating to QNX SDP 7.1
      • PCI Server User's Guide

      • Persistent Publish/Subscribe Developer's Guide

      • Platform-independent Publish/Subscribe Developer's Guide

        This guide is intended for application developers who want to use the Platform-independent Publish Subscribe (PiPS) framework to exchange information with other applications. First, the overall PiPS design and data-exchange model are explained. Then, tutorials on using PiPS are given. These tutorials cover key tasks such as selecting a publish-subscribe provider to use and writing plugins that read and write custom data types.

      • QDB Developer's Guide
        • Getting Started with QDB

          The QNX Database (QDB) server is a small-footprint, embeddable SQL database server. It is designed as an easy-to-configure QNX Neutrino resource manager.

        • QDB Command Line

          Configure and maintain QDB databases

        • QDB Client

          Execute SQL statements on QDB databases

        • QDB Application Example

          QDB provides methods for client applications to query a database and step through the query results. The sample program shown here provides a walkthrough of the sequence of QDB method calls necessary to connect to a QDB database, issue a query, read the data in the result set, and disconnect from the database.

        • Datatypes in QDB

          QDB databases, which are stored in SQLite files, allow any value stored in any database field to have one of five standard storage classes. The SQLite design doesn't enforce data typing on database columns but instead maps each input value to a storage class based on the column's type affinity (preference).

        • QDB Virtual Machine Opcodes

          QDB uses a virtual machine to execute SQL statements. You can configure QDB to list the opcodes of the programs generated to execute the SQL statements and you can trace program execution.

        • Writing User-Defined Functions

          QDB allows you to write your own functions for manipulating data. The QDB library includes several data structures and functions useful for defining custom functionality, while the SQLite API provides methods that your custom code can call to access arguments or set results.

        • QDB API Reference

          QDB provides a comprehensive API for managing databases and accessing data.

        • QDB SQL Reference

          QDB supports a subset of ANSI SQL-92.

          • Row ID and Autoincrement

            In QDB, every row of every table has a 64-bit signed integer row ID. This ID is unique for each row among all rows in the same table. You can prevent row IDs from ever being reused in a table by using the AUTOINCREMENT keyword.

          • Comments

            Comments make your SQL queries easier to read and understand.

          • Expressions

            SQL expressions are subcomponents of commands. Expressions combine one or more values, operators, and SQL functions to produce a result that can be used in the enclosing command.

          • Keywords

            QDB recognizes more than 100 SQL keywords related to command names, operators, sorting directives, and table, column, and query constraints. You must use special syntax to use keywords as names of program objects.

          • Statements

            QDB recognizes more than 20 types of SQL statements that create, modify, and delete tables, indexes, and triggers, and perform specialized tasks such as database cleanup.

            • ALTER TABLE

              Rename or add a new column to an existing table

            • ANALYZE

              Analyze indexes to optimize queries

            • ATTACH DATABASE

              Attach a database file to the current connection

            • CREATE INDEX

              Create an index

            • CREATE TABLE

              Create a table

            • CREATE TRIGGER

              Create a trigger

            • CREATE VIEW

              Create a view

            • DELETE

              Remove records from a table

            • DETACH DATABASE

              Detach a database file from the current connection

            • DROP INDEX

              Remove an index

            • DROP TABLE

              Remove a table

            • DROP TRIGGER

              Remove a trigger

            • DROP VIEW

              Remove a view

            • EXPLAIN

              Report virtual machine instructions for a command

            • INSERT

              Insert records into a table

            • ON CONFLICT

              Deal with a conflict

            • PRAGMA

              Modify or query the QDB library

            • REINDEX

              Recreate indexes from scratch

            • REPLACE

              Alias for INSERT OR REPLACE

            • SELECT

              Query a database

            • TRANSACTION

              Manually start, end, commit, or roll back a transaction

            • UPDATE

              Change the value of columns

            • VACUUM

              Clean the main database file

        • fileset Reference

          Copy a file set

      • QNX Helpers Developer's Guide

        These libraries provide QNX helpers, including helpers that assist with logging, string conversion, and number and type sizes.

      • SMMUMAN User's Guide

      • System Analysis Toolkit (SAT) User's Guide
      • System Architecture

        The System Architecture guide accompanies the QNX Neutrino RTOS and is intended for both application developers and end-users.

      • Technotes
      • User's Guide

        The QNX Neutrino User's Guide is intended for all users of a QNX Neutrino RTOS system, from system administrators to end users.

    • Audio & Graphics API

    • Multimedia

    • Networking Middleware

    • Programming

    • Sensor Framework

    • System Security Guide

      The QNX System Security Guide is intended for both system integrators who are responsible for the security of a QNX Neutrino RTOS system and developers who want to create a QNX Neutrino resource manager free from vulnerabilities.

    • Utilities & Libraries

  • QNX Hypervisor

    The QNX Hypervisor allows you to run multiple OSs on a target system so you can separate critical and non-critical functions, support a wide variety of applications, and reduce hardware costs.

  • QNX Software in the Cloud

    QNX Software in the Cloud enables developers to use the QNX software in Amazon Web Services (AWS) and Microsoft Azure (Azure).

  • QNX Advanced Virtualization Frameworks User's Guide

    This User's Guide is aimed at all systems integrators and developers who want to design and build embedded systems using the QNX Advanced Virtualization Frameworks.

  • Typographical Conventions, Support, and Licensing

    This section describes the typographical conventions used throughout the documentation and explains how to obtain technical support.

Statements

QDB recognizes more than 20 types of SQL statements that create, modify, and delete tables, indexes, and triggers, and perform specialized tasks such as database cleanup.

The statements described in this chapter are:

  • ALTER TABLE
  • ANALYZE
  • ATTACH DATABASE
  • CREATE INDEX
  • CREATE TABLE
  • CREATE TRIGGER
  • CREATE VIEW
  • DELETE
  • DETACH DATABASE
  • DROP INDEX
  • DROP TABLE
  • DROP TRIGGER
  • DROP VIEW
  • EXPLAIN
  • INSERT
  • ON CONFLICT
  • PRAGMA
  • REINDEX
  • REPLACE
  • SELECT
  • TRANSACTION
  • UPDATE
  • VACUUM
Page updated: March 12, 2026