• Products
    • CrateDB
    • CrateDB Cloud
    • Crate IoT Data Platform
    • CrateDB in Comparison
  • Use Cases
    • Customers
    • IoT & Sensor Data
    • Time Series
    • Geospatial Analytics
    • Cybersecurity
  • Resources
    • Documentation
    • Resource Library
    • Community
    • Partners
  • Blog
  • Get CrateDB
Toggle Doc Menu
Search Documentation
    • CrateDB
      • Tutorials
      • Reference
        • CLI tools
          • crate
            • Synopsis
            • Options
            • Signal handling
            • Example
          • crate-node
            • Synopsis
            • Commands
            • Options
        • Configuration
          • Node-specific settings
            • Basics
            • Node types
            • Read-only node
            • Hosts
            • Ports
            • Paths
            • Plug-ins
            • CPU
            • Memory
            • Garbage collection
            • Authentication
            • Secured communications (SSL/TLS)
            • Cross-origin resource sharing (CORS)
            • Blobs
            • Repositories
            • Queries
            • Javascript language
            • Custom attributes
          • Cluster-wide settings
            • Non-runtime cluster-wide settings
            • Collecting stats
            • Usage data collector
            • Graceful stop
            • Bulk operations
            • Discovery
            • Routing allocation
            • Recovery
            • Memory management
            • Query circuit breaker
            • Field data circuit breaker
            • Request circuit breaker
            • Accounting circuit breaker
            • Stats circuit breakers
            • Total circuit breaker
            • Thread pools
            • Metadata
          • Session settings
            • Usage
            • Supported session settings
          • Logging
            • Application logging
            • JVM logging
          • Environment variables
            • Application variables
            • JVM variables
        • General use
          • Data definition
            • Creating tables
            • Data types
            • System columns
            • Generated columns
            • Constraints
            • Storage
            • Partitioned tables
            • Sharding
            • Replication
            • Shard allocation filtering
            • Column policy
            • Fulltext indices
            • Fulltext analyzers
            • Show Create Table
            • Views
            • Altering tables
          • Data manipulation
            • Inserting data
            • Updating data
            • Deleting data
            • Import and export
          • Querying Crate
            • Selecting data
            • Joins
            • Union All
            • Refresh
            • Fulltext search
            • Geo search
          • Built-in functions and operators
            • Scalar functions
            • Aggregation
            • Arithmetic operators
            • Table functions
            • Comparison operators
            • Array comparisons
            • Subquery expressions
            • Window functions
          • User-defined functions
            • CREATE OR REPLACE
            • Supported types
            • Overloading
            • Determinism
            • DROP FUNCTION
            • Supported languages
          • Blobs
            • Creating a table for blobs
            • Custom location for storing blob data
            • List
            • Altering a blob table
            • Deleting a blob table
            • Using blob tables
          • Optimistic Concurrency Control
            • Introduction
            • Optimistic update
            • Optimistic delete
            • Known limitations
          • Information schema
            • Access
            • Virtual tables
        • Administration
          • System information
            • Cluster
            • Nodes
            • Node checks
            • Shards
            • Segments
            • Jobs, operations, and logs
            • Cluster checks
            • Health
            • Repositories
            • Snapshots
            • Summits
            • Users
            • Allocations
            • Shard table permissions
            • Sys jobs tables permissions
            • pg_stats
          • Runtime configuration
          • User management
            • Introduction
            • CREATE USER
            • ALTER USER
            • DROP USER
            • List users
          • Privileges
            • Privilege types
            • Hierarchical inheritance of privileges
            • Behavior of GRANT, DENY and REVOKE
            • List privileges
          • Authentication
            • Authentication Methods
            • Host Based Authentication (HBA)
          • Secured communications (SSL/TLS)
            • SSL/TLS configuration
            • Setting up a Keystore/Truststore with a certificate chain
          • Optimization
            • Introduction
            • Multiple table optimization
            • Partition optimization
            • Segments upgrade
          • Jobs management
          • JMX monitoring
            • Setup
            • Using Docker
            • JMX Beans
            • Exposing JMX via HTTP
          • Snapshots
            • Snapshot
            • Restore
            • Cleanup
            • Requirements for using HDFS repositories
          • Cloud discovery
            • Amazon EC2 discovery
            • Microsoft Azure discovery
          • Usage Data Collector
            • Technical information
            • Admin UI tracking
            • Configuration
            • How to disable UDC
        • SQL syntax
          • General SQL
            • Constraints
            • Value expressions
            • Lexical structure
          • SQL Statements
            • ALTER CLUSTER
            • ALTER TABLE
            • ALTER USER
            • ANALYZE
            • BEGIN
            • COMMIT
            • COPY FROM
            • COPY TO
            • CREATE ANALYZER
            • CREATE BLOB TABLE
            • CREATE FUNCTION
            • CREATE REPOSITORY
            • CREATE SNAPSHOT
            • CREATE TABLE
            • CREATE USER
            • CREATE VIEW
            • DEALLOCATE
            • DELETE
            • DENY
            • DROP ANALYZER
            • DROP FUNCTION
            • DROP REPOSITORY
            • DROP SNAPSHOT
            • DROP TABLE
            • DROP USER
            • DROP VIEW
            • EXPLAIN
            • GRANT
            • INSERT
            • KILL
            • OPTIMIZE
            • REFRESH
            • RESTORE SNAPSHOT
            • REVOKE
            • SELECT
            • SET and RESET
            • SET TRANSACTION
            • SET LICENSE
            • SHOW COLUMNS
            • SHOW CREATE TABLE
            • SHOW SCHEMAS
            • SHOW TABLES
            • SHOW (session settings)
            • UPDATE
            • VALUES
        • Client interfaces
          • HTTP endpoint
            • Introduction
            • Parameter substitution
            • Default schema
            • Column types
            • Bulk operations
            • Error handling
          • PostgreSQL wire protocol
            • Introduction
            • Server compatibility and implementation status
            • Client compatibility
            • Implementation differences
        • Editions
          • CrateDB
            • Enterprise features
            • Node limitation
          • CrateDB Community Edition
        • Appendices
          • Release Notes
            • Versions
            • Older Versions
          • Compatibility
            • Implementation notes
            • Unsupported features and functions
          • SQL standard compliance
      • Guide
    • CrateDB Cloud
      • Getting Started
      • Console
      • Croud CLI
    • CrateDB Clients
      • CrateDB Admin UI
      • CrateDB Shell
      • JDBC
      • PHP DBAL
      • PHP PDO
      • Python
      • .NET Npgsql
    • Sample Applications
    • Support
v:latest
latest 4.0 3.3 3.2 3.1 3.0 2.3 1.2 0.57

General SQLΒΆ

Table of contents

  • Constraints
  • Value expressions
  • Lexical structure
Edit on GitHub

Product

  • CrateDB
  • CrateDB Editions
  • CrateDB Cloud on Azure
  • CrateDB Cloud
  • Crate IoT Data Platform
  • CrateDB Comparison
  • Pricing
  • Get CrateDB

Use Cases

  • Customers
  • Use Cases
  • IoT & Sensors
  • Time Series
  • Geospatial Tracking
  • Cybersecurity

Resources

  • Resource Library
  • Blog
  • Events
  • Community
  • Contribute
  • Github

Documentation

  • Get started
  • Full References
  • User Guide
  • Support
  • SQL 99 Docs

Company

  • About us
  • Jobs
  • Partners
  • Press
  • Contact
  • Legal
  • Privacy Policy
  • Imprint