skip to main content
Glossary : SQL Grammar
  

Try DataDirect Drivers Now

SQL Grammar

ODBC defines a core grammar that roughly corresponds to the X/Open and SQL Access Group SQL CAE specification (1992). ODBC also defines a minimum grammar, to meet a basic level of ODBC conformance, and an extended grammar, to provide for common DBMS extensions to SQL. The following list summarizes the grammar included in each conformance level:
Minimum SQL Grammar:
*Data Definition Language (DDL): CREATE TABLE and DROP TABLE.
*Data Manipulation Language (DML): simple SELECT, INSERT, UPDATE SEARCHED, and DELETE SEARCHED.
*Expressions: simple (such as A > B + C).
*Data types: CHAR, VARCHAR, or LONG VARCHAR.
Core SQL Grammar:
*Minimum SQL grammar and data types.
*DDL: ALTER TABLE, CREATE INDEX, DROP INDEX, CREATE VIEW, DROP VIEW, GRANT, and REVOKE.
*DML: full SELECT.
*Expressions: subquery, set functions such as SUM and MIN.
*Data types: DECIMAL, NUMERIC, SMALLINT, INTEGER, REAL, FLOAT, DOUBLE PRECISION.
Extended SQL Grammar:
*Minimum and Core SQL grammar and data types.
*DML: outer joins, positioned UPDATE, positioned DELETE, SELECT FOR UPDATE, and unions.
*Expressions: scalar functions such as SUBSTRING and ABS, date, time, and timestamp literals.
*Data types: BIT, TINYINT, BIGINT, BINARY, VARBINARY, LONG VARBINARY, DATE, TIME, TIMESTAMP.
*Batch SQL statements.
*Procedure calls.