Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6444

Add support for INSERT INTO table DEFAULT VALUES syntax

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 10.10.1.1
    • None
    • SQL
    • Normal
    • Deviation from standard

    Description

      Many other databases support specific syntax to create an "empty" or "default" record in a table:

      INSERT INTO table DEFAULT VALUES

      The above syntax is equivalent to this:

      INSERT INTO table (v1, v2, ..., vn) VALUES (DEFAULT, DEFAULT, ..., DEFAULT)

      Just to name a few databases that support this syntax:

      • CUBRID
      • Firebird
      • H2
      • HSQLDB
      • Ingres
      • PostgreSQL
      • SQLite
      • SQL Server
      • Sybase

      For convenience it would be great if the SQL-92 Standard (http://www.andrew.cmu.edu/user/shadow/sql/sql1992.txt) would be implemented:

      13.8 <insert statement>

      Function

      Create new rows in a table.

      Format

      <insert statement> ::=
      INSERT INTO <table name>
      <insert columns and source>

      <insert columns and source> ::=
      [ <left paren> <insert column list> <right paren> ]
      <query expression>

      DEFAULT VALUES

      <insert column list> ::= <column name list>

      Attachments

        Activity

          People

            Unassigned Unassigned
            lukas.eder Lukas Eder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: