-- $Id: sql:2003-features.sql 463 2004-11-28 23:37:22Z troels $

CREATE TABLE feature (
    feature_id character(4) PRIMARY KEY,
    feature_name character varying(200) NOT NULL,
    seen_in character varying(30) NOT NULL,
    mandatory boolean NOT NULL
);

CREATE TABLE sub_feature (
    feature_id character(4) NOT NULL REFERENCES feature,
    sub_feature_id character(2) NOT NULL,
    sub_feature_name character varying(200) NOT NULL,
    seen_in character varying(30) NOT NULL,
    mandatory boolean NOT NULL,
    PRIMARY KEY(feature_id,sub_feature_id)
);

CREATE TABLE package (
    package_id character(6) PRIMARY KEY,
    description character varying(40) NOT NULL
);

CREATE TABLE package_feature (
    package_id character(6) NOT NULL REFERENCES package,
    feature_id character(4) NOT NULL REFERENCES feature,
    PRIMARY KEY(package_id,feature_id)
);

CREATE VIEW sql_features AS
     SELECT f.feature_id, feature_name, coalesce(sub_feature_id,'') as sub_feature_id, sub_feature_name
       FROM feature f
  LEFT JOIN sub_feature s
      USING (feature_id);

CREATE VIEW missing_features AS
SELECT s.feature_id, s.feature_name, COALESCE(s.sub_feature_id, VARCHAR '') AS sub_feature_id, COALESCE(s.sub_feature_name, VARCHAR '') AS sub_feature_name, VARCHAR 'NO' AS supported, NULL AS is_verified_by, VARCHAR '' AS comments FROM (sql_features s LEFT JOIN information_schema.sql_features i ON (s.feature_id = i.feature_id AND s.sub_feature_id = i.sub_feature_id)) WHERE (i.feature_id IS NULL) ORDER BY s.feature_id, s.sub_feature_id, s.sub_feature_name;

create view feature_summary as select feature_id||(case when sub_feature_id='' then '' else '-'||sub_feature_id end) as feature_id,feature_name||coalesce(' - '||sub_feature_name,'') as feature_name from sql_features;

INSERT INTO feature VALUES ('E011', 'Numeric data types', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E021', 'Character string types', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E031', 'Identifiers', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E051', 'Basic query specification', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E061', 'Basic predicates and search conditions', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E071', 'Basic query expressions', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E081', 'Basic Privileges', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E091', 'Set functions', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E101', 'Basic data manipulation', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E111', 'Single row SELECT statement', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E121', 'Basic cursor support', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E131', 'Null value support (nulls in lieu of values)', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E141', 'Basic integrity constraints', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E151', 'Transaction support', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E152', 'Basic SET TRANSACTION statement', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E153', 'Updatable queries with subqueries', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E161', 'SQL comments using leading double minus', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E171', 'SQLSTATE support', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('E182', 'Module language', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F031', 'Basic schema manipulation', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F041', 'Basic joined table', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F051', 'Basic date and time', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F081', 'UNION and EXCEPT in views', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F131', 'Grouped operations', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F181', 'Multiple module support', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F201', 'CAST function', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F221', 'Explicit defaults', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F261', 'CASE expression', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F311', 'Schema definition statement', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F471', 'Scalar subquery values', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F481', 'Expanded NULL predicate', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F812', 'Basic flagging', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('S011', 'Distinct data types', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('T321', 'Basic SQL-invoked routines', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('T631', 'IN predicate with one list element', 'SQL/Foundation', true);
INSERT INTO feature VALUES ('F021', 'Basic information schema', 'SQL/Schemata', true);
INSERT INTO feature VALUES ('F501', 'Features and conformance views', 'SQL/Schemata', true);
INSERT INTO feature VALUES ('C011', 'Call-Level Interface', 'SQL/CLI', true);
INSERT INTO feature VALUES ('B011', 'Embedded Ada', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B012', 'Embedded C', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B013', 'Embedded COBOL', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B014', 'Embedded Fortran', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B015', 'Embedded MUMPS', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B016', 'Embedded Pascal', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B017', 'Embedded PL/I', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B021', 'Direct SQL', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B031', 'Basic dynamic SQL', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B032', 'Extended dynamic SQL', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B033', 'Untyped SQL-invoked function arguments', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B034', 'Dynamic specification of cursor attributes', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B041', 'Extensions to embedded SQL exception declarations', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B051', 'Enhanced execution rights', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B111', 'Module language Ada', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B112', 'Module language C', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B113', 'Module language COBOL', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B114', 'Module language Fortran', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B115', 'Module language MUMPS', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B116', 'Module language Pascal', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B117', 'Module language PL/I', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B121', 'Routine language Ada', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B122', 'Routine language C', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B123', 'Routine language COBOL', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B124', 'Routine language Fortran', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B125', 'Routine language MUMPS', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B126', 'Routine language Pascal', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B127', 'Routine language PL/I', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('B128', 'Routine language SQL', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F032', 'CASCADE drop behavior', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F033', 'ALTER TABLE statement: DROP COLUMN clause', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F034', 'Extended REVOKE statement', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F052', 'Intervals and datetime arithmetic', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F053', 'OVERLAPS predicate', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F111', 'Isolation levels other than SERIALIZABLE', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F121', 'Basic diagnostics management', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F171', 'Multiple schemas per user', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F191', 'Referential delete actions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F222', 'INSERT statement: DEFAULT VALUES clause', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F231', 'Privilege tables', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F251', 'Domain support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F262', 'Extended CASE expression', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F263', 'Comma-separated predicates in simple CASE expression', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F271', 'Compound character literals', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F281', 'LIKE enhancements', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F291', 'UNIQUE predicate', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F301', 'CORRESPONDING in query expressions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F302', 'INTERSECT table operator', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F304', 'EXCEPT ALL table operator', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F312', 'MERGE statement', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F321', 'User authorization', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F341', 'Usage tables', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F361', 'Subprogram support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F381', 'Extended schema manipulation', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F391', 'Long identifiers', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F392', 'Unicode escapes in identifiers', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F393', 'Unicode escapes in literals', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F401', 'Extended joined table', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F402', 'Named column joins for LOBs, arrays, and multisets', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F411', 'Time zone specification', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F421', 'National character', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F431', 'Read-only scrollable cursors', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F441', 'Extended set function support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F442', 'Mixed column references in set functions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F451', 'Character set definition', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F461', 'Named character sets', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F491', 'Constraint management', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F502', 'Enhanced documentation tables', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F521', 'Assertions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F531', 'Temporary tables', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F555', 'Enhanced seconds precision', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F561', 'Full value expressions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F571', 'Truth value tests', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F591', 'Derived tables', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F611', 'Indicator data types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F641', 'Row and table constructors', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F651', 'Catalog name qualifiers', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F661', 'Simple tables', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F671', 'Subqueries in CHECK', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F672', 'Retrospective check constraints', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F691', 'Collation and translation', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F692', 'Enhanced collation support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F693', 'SQL-session and client module collations', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F695', 'Translation support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F696', 'Additional translation documentation', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F701', 'Referential update actions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F711', 'ALTER domain', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F721', 'Deferrable constraints', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F731', 'INSERT column privileges', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F741', 'Referential MATCH types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F751', 'View CHECK enhancements', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F761', 'Session management', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F771', 'Connection management', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F781', 'Self-referencing operations', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F791', 'Insensitive cursors', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F801', 'Full set function', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F813', 'Extended flagging', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F821', 'Local table references', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('F831', 'Full cursor update', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S023', 'Basic structured types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S024', 'Enhanced structured types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S025', 'Final structured types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S026', 'Self-referencing structured types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S027', 'Create method by specific method name', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S028', 'Permutable UDT options list', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S041', 'Basic reference types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S043', 'Enhanced reference types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S051', 'Create table of type', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S071', 'SQL paths in function and type name resolution', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S081', 'Subtables', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S091', 'Basic array support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S092', 'Arrays of user-defined types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S094', 'Arrays of reference types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S095', 'Array constructors by query', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S096', 'Optional array bounds', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S097', 'Array element assignment', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S111', 'ONLY in query expressions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S151', 'Type predicate', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S161', 'Subtype treatment', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S162', 'Subtype treatment for references', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S201', 'SQL-invoked routines on arrays', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S202', 'SQL-invoked routines on multisets', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S211', 'User-defined cast functions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S231', 'Structured type locators', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S232', 'Array locators', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S233', 'Multiset locators', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S241', 'Transform functions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S242', 'Alter transform statement', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S251', 'User-defined orderings', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S261', 'Specific type method', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S271', 'Basic multiset support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S272', 'Multisets of user-defined types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S274', 'Multisets of reference types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S275', 'Advanced multiset support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S281', 'Nested collection types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('S291', 'Unique constraint on entire row', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T011', 'Timestamp in Information Schema', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T031', 'BOOLEAN data type', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T041', 'Basic LOB data type support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T042', 'Extended LOB data type support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T051', 'Row types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T052', 'MAX and MIN for row types', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T053', 'Explicit aliases for all-fields reference', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T061', 'UCS support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T071', 'BIGINT data type', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T111', 'Updatable joins, unions, and columns', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T121', 'WITH (excluding RECURSIVE) in query expression', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T122', 'WITH (excluding RECURSIVE) in subquery', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T131', 'Recursive query', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T132', 'Recursive query in subquery', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T141', 'SIMILAR predicate', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T151', 'DISTINCT predicate', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T152', 'DISTINCT predicate with negation', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T171', 'LIKE clause in table definition', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T172', 'AS subquery clause in table definition', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T173', 'Extended LIKE clause in table definition', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T174', 'Identity columns', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T175', 'Generated columns', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T176', 'Sequence generator support', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T191', 'Referential action RESTRICT', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T201', 'Comparable data types for referential constraints', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T211', 'Basic trigger capability', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T212', 'Enhanced trigger capability', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T231', 'Sensitive cursors', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T241', 'START TRANSACTION statement', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T251', 'SET TRANSACTION statement: LOCAL option', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T261', 'Chained transactions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T271', 'Savepoints', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T272', 'Enhanced savepoint management', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T281', 'SELECT privilege with column granularity', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T301', 'Functional dependencies', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T312', 'OVERLAY function', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T322', 'Overloading of SQL-invoked functions and procedures', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T323', 'Explicit security for external routines', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T324', 'Explicit security for SQL routines', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T325', 'Qualified SQL parameter references', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T326', 'Table functions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T331', 'Basic roles', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T332', 'Extended roles', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T351', 'Bracketed SQL comments (/*...*/ comments)', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T431', 'Extended grouping capabilities', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T432', 'Nested and concatenated GROUPING SETS', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T433', 'Multiargument GROUPING function', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T434', 'GROUP BY DISINCT', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T441', 'ABS and MOD functions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T461', 'Symmetric BETWEEN predicate', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T471', 'Result sets return value', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T491', 'LATERAL derived table', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T501', 'Enhanced EXISTS predicate', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T511', 'Transaction counts', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T551', 'Optional key words for default syntax', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T561', 'Holdable locators', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T571', 'Array-returning external SQL-invoked functions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T572', 'Multiset-returning external SQL-invoked functions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T581', 'Regular expression substring function', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T591', 'UNIQUE constraints of possibly null columns', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T601', 'Local cursor references', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T611', 'Elementary OLAP operations', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T612', 'Advanced OLAP operations', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T613', 'Sampling', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T621', 'Enhanced numeric functions', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T641', 'Multiple column assignment', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T651', 'SQL-schema statements in SQL routines', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T652', 'SQL-dynamic statements in SQL routines', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T653', 'SQL-schema statements in external routines', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T654', 'SQL-dynamic statements in external routines', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('T655', 'Cyclically dependent routines', 'SQL/Foundation', false);
INSERT INTO feature VALUES ('J511', 'Commands', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J521', 'JDBC data types', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J531', 'Deployment', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J541', 'SERIALIZABLE', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J551', 'SQLDATA', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J561', 'JAR privileges', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J571', 'NEW operator', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J581', 'Output parameters', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J591', 'Overloading', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J601', 'SQL-Java paths', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J611', 'References', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J621', 'external Java routines', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J622', 'external Java types', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J631', 'Java signatures', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J641', 'Static fields', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J651', 'SQL/JRT Information Schema', 'SQL/JRT', false);
INSERT INTO feature VALUES ('J652', 'SQL/JRT Usage tables', 'SQL/JRT', false);
INSERT INTO feature VALUES ('M001', 'Datalinks', 'SQL/MED', false);
INSERT INTO feature VALUES ('M002', 'Datalinks via SQL/CLI', 'SQL/MED', false);
INSERT INTO feature VALUES ('M003', 'Datalinks via Embedded SQL', 'SQL/MED', false);
INSERT INTO feature VALUES ('M004', 'Foreign data support', 'SQL/MED', false);
INSERT INTO feature VALUES ('M005', 'Foreign schema support', 'SQL/MED', false);
INSERT INTO feature VALUES ('M006', 'GetSQLString routine', 'SQL/MED', false);
INSERT INTO feature VALUES ('M007', 'TransmitRequest', 'SQL/MED', false);
INSERT INTO feature VALUES ('M009', 'GetOpts and GetStatistics routines', 'SQL/MED', false);
INSERT INTO feature VALUES ('M010', 'Foreign data wrapper support', 'SQL/MED', false);
INSERT INTO feature VALUES ('M011', 'Datalinks via Ada', 'SQL/MED', false);
INSERT INTO feature VALUES ('M012', 'Datalinks via C', 'SQL/MED', false);
INSERT INTO feature VALUES ('M013', 'Datalinks via COBOL', 'SQL/MED', false);
INSERT INTO feature VALUES ('M014', 'Datalinks via Fortran', 'SQL/MED', false);
INSERT INTO feature VALUES ('M015', 'Datalinks via M', 'SQL/MED', false);
INSERT INTO feature VALUES ('M016', 'Datalinks via Pascal', 'SQL/MED', false);
INSERT INTO feature VALUES ('M017', 'Datalinks via PL/I', 'SQL/MED', false);
INSERT INTO feature VALUES ('M018', 'Foreign-data wrapper interface routines in Ada', 'SQL/MED', false);
INSERT INTO feature VALUES ('M019', 'Foreign-data wrapper interface routines in C', 'SQL/MED', false);
INSERT INTO feature VALUES ('M020', 'Foreign-data wrapper interface routines in COBOL', 'SQL/MED', false);
INSERT INTO feature VALUES ('M021', 'Foreign-data wrapper interface routines in Fortran', 'SQL/MED', false);
INSERT INTO feature VALUES ('M022', 'Foreign-data wrapper interface routines in MUMPS', 'SQL/MED', false);
INSERT INTO feature VALUES ('M023', 'Foreign-data wrapper interface routines in Pascal', 'SQL/MED', false);
INSERT INTO feature VALUES ('M024', 'Foreign-data wrapper interface routines in PL/I', 'SQL/MED', false);
INSERT INTO feature VALUES ('M030', 'SQL-server foreign data support', 'SQL/MED', false);
INSERT INTO feature VALUES ('M031', 'Foreign data wrapper general routines', 'SQL/MED', false);
INSERT INTO feature VALUES ('J001', 'Embedded Java', 'SQL/OLB', false);
INSERT INTO feature VALUES ('J002', 'ResultSetIterator access to JDBC ResultSet', 'SQL/OLB', false);
INSERT INTO feature VALUES ('J003', 'Execution control', 'SQL/OLB', false);
INSERT INTO feature VALUES ('J004', 'Batch update', 'SQL/OLB', false);
INSERT INTO feature VALUES ('J005', 'Call statement', 'SQL/OLB', false);
INSERT INTO feature VALUES ('J006', 'Assignment Function statement', 'SQL/OLB', false);
INSERT INTO feature VALUES ('J007', 'Compound statement', 'SQL/OLB', false);
INSERT INTO feature VALUES ('J008', 'Datalinks via SQL language', 'SQL/OLB', false);
INSERT INTO feature VALUES ('J009', 'Multiple Open ResultSets', 'SQL/OLB', false);
INSERT INTO feature VALUES ('P001', 'Stored modules', 'SQL/PSM', false);
INSERT INTO feature VALUES ('P002', 'Computational completeness', 'SQL/PSM', false);
INSERT INTO feature VALUES ('P003', 'Information Schema views', 'SQL/PSM', false);
INSERT INTO feature VALUES ('P004', 'Extended CASE statement', 'SQL/PSM', false);
INSERT INTO feature VALUES ('P005', 'Qualified SQL variable references', 'SQL/PSM', false);
INSERT INTO feature VALUES ('P006', 'Multiple assignment', 'SQL/PSM', false);
INSERT INTO feature VALUES ('P007', 'Enhanced diagnostics management', 'SQL/PSM', false);
INSERT INTO feature VALUES ('P008', 'Comma-separated predicates in a CASE statement', 'SQL/PSM', false);
INSERT INTO feature VALUES ('X010', 'XML type', 'SQL/XML', false);
INSERT INTO feature VALUES ('X011', 'Arrays of XML type', 'SQL/XML', false);
INSERT INTO feature VALUES ('X012', 'Multisets of XML type', 'SQL/XML', false);
INSERT INTO feature VALUES ('X013', 'Distinct types of XML', 'SQL/XML', false);
INSERT INTO feature VALUES ('X014', 'Attributes of XML type', 'SQL/XML', false);
INSERT INTO feature VALUES ('X015', 'Fields of XML type', 'SQL/XML', false);
INSERT INTO feature VALUES ('X016', 'Persistent XML values', 'SQL/XML', false);
INSERT INTO feature VALUES ('X020', 'XML Concatenation', 'SQL/XML', false);
INSERT INTO feature VALUES ('X031', 'XMLElement', 'SQL/XML', false);
INSERT INTO feature VALUES ('X032', 'XMLForest', 'SQL/XML', false);
INSERT INTO feature VALUES ('X033', 'XMLRoot', 'SQL/XML', false);
INSERT INTO feature VALUES ('X034', 'XMLAgg', 'SQL/XML', false);
INSERT INTO feature VALUES ('X035', 'XMLAgg: ORDER BY option', 'SQL/XML', false);
INSERT INTO feature VALUES ('X041', 'Basic table mapping: null absent', 'SQL/XML', false);
INSERT INTO feature VALUES ('X042', 'Basic table mapping: null as nil', 'SQL/XML', false);
INSERT INTO feature VALUES ('X043', 'Basic table mapping: table as forest', 'SQL/XML', false);
INSERT INTO feature VALUES ('X044', 'Basic table mapping: table as element', 'SQL/XML', false);
INSERT INTO feature VALUES ('X045', 'Basic table mapping: with target namespace', 'SQL/XML', false);
INSERT INTO feature VALUES ('X046', 'Basic table mapping: data mapping', 'SQL/XML', false);
INSERT INTO feature VALUES ('X047', 'Basic table mapping: metadata mapping', 'SQL/XML', false);
INSERT INTO feature VALUES ('X048', 'Basic table mapping: base64 encoding of binary strings', 'SQL/XML', false);
INSERT INTO feature VALUES ('X049', 'Basic table mapping: hex encoding of binary strings', 'SQL/XML', false);
INSERT INTO feature VALUES ('X051', 'Advanced table mapping: null absent', 'SQL/XML', false);
INSERT INTO feature VALUES ('X052', 'Advanced table mapping: null as nil', 'SQL/XML', false);
INSERT INTO feature VALUES ('X053', 'Advanced table mapping: table as forest', 'SQL/XML', false);
INSERT INTO feature VALUES ('X054', 'Advanced table mapping: table as element', 'SQL/XML', false);
INSERT INTO feature VALUES ('X055', 'Advanced table mapping: with target namespace', 'SQL/XML', false);
INSERT INTO feature VALUES ('X056', 'Advanced table mapping: data mapping', 'SQL/XML', false);
INSERT INTO feature VALUES ('X057', 'Advanced table mapping: metadata mapping', 'SQL/XML', false);
INSERT INTO feature VALUES ('X058', 'Advanced table mapping: base64 encoding of binary strings', 'SQL/XML', false);
INSERT INTO feature VALUES ('X059', 'Advanced table mapping: hex encoding of binary strings', 'SQL/XML', false);
INSERT INTO feature VALUES ('X060', 'XMLParse: CONTENT option', 'SQL/XML', false);
INSERT INTO feature VALUES ('X061', 'XMLParse: DOCUMENT option', 'SQL/XML', false);
INSERT INTO feature VALUES ('X062', 'XMLParse: explicit WHITESPACE option', 'SQL/XML', false);
INSERT INTO feature VALUES ('X070', 'XMLSerialize: CONTENT option', 'SQL/XML', false);
INSERT INTO feature VALUES ('X071', 'XMLSerialize: DOCUMENT option', 'SQL/XML', false);
INSERT INTO feature VALUES ('X080', 'Namespaces in XML publishing', 'SQL/XML', false);
INSERT INTO feature VALUES ('X081', 'Query-level XML namespace declarations', 'SQL/XML', false);
INSERT INTO feature VALUES ('X082', 'XML namespace declarations in DML', 'SQL/XML', false);
INSERT INTO feature VALUES ('X084', 'XML namespace declarations in compound statements', 'SQL/XML', false);
INSERT INTO feature VALUES ('X090', 'XML document predicate', 'SQL/XML', false);
INSERT INTO feature VALUES ('X100', 'Host language support for XML: CONTENT option', 'SQL/XML', false);
INSERT INTO feature VALUES ('X101', 'Host language support for XML: DOCUMENT option', 'SQL/XML', false);
INSERT INTO feature VALUES ('X110', 'Host language support for XML: VARCHAR mapping', 'SQL/XML', false);
INSERT INTO feature VALUES ('X111', 'Host language support for XML: CLOB mapping', 'SQL/XML', false);
INSERT INTO feature VALUES ('X120', 'XML parameters in SQL routines', 'SQL/XML', false);
INSERT INTO feature VALUES ('X121', 'XML parameters in external routines', 'SQL/XML', false);
INSERT INTO feature VALUES ('X131', 'Query-level XMLBINARY clause', 'SQL/XML', false);
INSERT INTO feature VALUES ('X132', 'XMLBINARY clause in DML', 'SQL/XML', false);
INSERT INTO feature VALUES ('X133', 'XMLBINARY clause in DDL', 'SQL/XML', false);
INSERT INTO feature VALUES ('X134', 'XMLBINARY clause in compound statements', 'SQL/XML', false);
INSERT INTO feature VALUES ('X135', 'XMLBINARY clause in subqueries', 'SQL/XML', false);

INSERT INTO sub_feature VALUES ('E011', '01', 'INTEGER and SMALLINT data types', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E011', '02', 'REAL, DOUBLE PRECISON, and FLOAT data types', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E011', '03', 'DECIMAL and NUMERIC data types', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E011', '04', 'Arithmetic operators', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E011', '05', 'Numeric comparison', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E011', '06', 'Implicit casting among the numeric data types', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '01', 'CHARACTER data type', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '02', 'CHARACTER VARYING data type', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '03', 'Character literals', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '04', 'CHARACTER_LENGTH function', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '05', 'OCTET_LENGTH function', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '06', 'SUBSTRING function', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '07', 'Character concatenation', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '08', 'UPPER and LOWER functions', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '09', 'TRIM function', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '10', 'Implicit casting among the fixed-length and variable-length character string types', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '11', 'POSITION function', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E021', '12', 'Character comparison', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E031', '01', 'Delimited identifiers', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E031', '02', 'Lower case identifiers', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E031', '03', 'Trailing underscore', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E051', '01', 'SELECT DISTINCT', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E051', '02', 'GROUP BY clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E051', '04', 'GROUP BY can contain columns not in <select list>', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E051', '05', 'Select list items can be renamed', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E051', '06', 'HAVING clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E051', '07', 'Qualified * in select list', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E051', '08', 'Correlation names in the FROM clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E051', '09', 'Rename columns in the FROM clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '01', 'Comparison predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '02', 'BETWEEN predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '03', 'IN predicate with list of values', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '04', 'LIKE predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '05', 'LIKE predicate: ESCAPE clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '06', 'NULL predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '07', 'Quantified comparison predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '08', 'EXISTS predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '09', 'Subqueries in comparison predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '11', 'Subqueries in IN predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '12', 'Subqueries in quantified comparison predicate', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '13', 'Correlated subqueries', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E061', '14', 'Search condition', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E071', '01', 'UNION DISTINCT table operator', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E071', '02', 'UNION ALL table operator', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E071', '03', 'EXCEPT DISTINCT table operator', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E071', '05', 'Columns combined via table operators need not have exactly the same data type.', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E071', '06', 'Table operators in subqueries', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '01', 'SELECT privilege at the table level', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '02', 'DELETE privilege', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '03', 'INSERT privilege at the table level', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '04', 'UPDATE privilege at the table level', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '05', 'UPDATE privilege at the column level', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '06', 'REFERENCES privilege at the table level', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '07', 'REFERENCES privilege at the column level', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '08', 'WITH GRANT OPTION', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '09', 'USAGE privilege', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E081', '10', 'EXECUTE privilege', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E091', '01', 'AVG', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E091', '02', 'COUNT', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E091', '03', 'MAX', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E091', '04', 'MIN', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E091', '05', 'SUM', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E091', '06', 'ALL quantifier', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E091', '07', 'DISTINCT quantifier', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E101', '01', 'INSERT statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E101', '03', 'Searched UPDATE statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E101', '04', 'Searched DELETE statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '01', 'DECLARE CURSOR', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '02', 'ORDER BY columns need not be in select list', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '03', 'Value expressions in ORDER BY clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '04', 'OPEN statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '06', 'Positioned UPDATE statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '07', 'Positioned DELETE statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '08', 'CLOSE statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '10', 'FETCH statement: implicit NEXT', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E121', '17', 'WITH HOLD cursors', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E141', '01', 'NOT NULL constraints', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E141', '02', 'UNIQUE constraints of NOT NULL columns', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E141', '03', 'PRIMARY KEY constraints', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E141', '04', 'Basic FOREIGN KEY constraint with the NO ACTION default for both referential delete action and referential update action.', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E141', '06', 'CHECK constraints', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E141', '07', 'Column defaults', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E141', '08', 'NOT NULL inferred on PRIMARY KEY', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E141', '10', 'Names in a foreign key can be specified in any order', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E151', '01', 'COMMIT statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E151', '02', 'ROLLBACK statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E152', '01', 'SET TRANSACTION statement: ISOLATION LEVEL SERIALIZABLE clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('E152', '02', 'SET TRANSACTION statement: READ ONLY and READ WRITE clauses', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F031', '01', 'CREATE TABLE statement to create persistent base tables', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F031', '02', 'CREATE VIEW statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F031', '03', 'GRANT statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F031', '04', 'ALTER TABLE statement: ADD COLUMN clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F031', '13', 'DROP TABLE statement: RESTRICT clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F031', '16', 'DROP VIEW statement: RESTRICT clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F031', '19', 'REVOKE statement: RESTRICT clause', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F041', '01', 'Inner join (but not necessarily the INNER keyword)', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F041', '02', 'INNER keyword', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F041', '03', 'LEFT OUTER JOIN', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F041', '04', 'RIGHT OUTER JOIN', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F041', '05', 'Outer joins can be nested', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F041', '07', 'The inner table in a left or right outer join can also be used in an inner join', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F041', '08', 'All comparison operators are supported (rather than just =)', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F051', '01', 'DATE data type (including support of DATE literal)', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F051', '02', 'TIME data type (including support of TIME literal) with fractional seconds precision of at least 0.', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F051', '03', 'TIMESTAMP data type (including support of TIMESTAMP literal) with fractional seconds precision of at least 0 and 6.', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F051', '04', 'Comparison predicate on DATE, TIME, and TIMESTAMP data types', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F051', '05', 'Explicit CAST between datetime types and character string types', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F051', '06', 'CURRENT_DATE', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F051', '07', 'LOCALTIME', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F051', '08', 'LOCALTIMESTAMP', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F131', '01', 'WHERE, GROUP BY, and HAVING clauses supported in queries with grouped views', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F131', '02', 'Multiple tables supported in queries with grouped views', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F131', '03', 'Set functions supported in queries with grouped views', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F131', '04', 'Subqueries with GROUP BY and HAVING clauses and grouped views', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F131', '05', 'Single row SELECT with GROUP BY and HAVING clauses and grouped views', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F261', '01', 'Simple CASE', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F261', '02', 'Searched CASE', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F261', '03', 'NULLIF', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F261', '04', 'COALESCE', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F311', '01', 'CREATE SCHEMA', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F311', '02', 'CREATE TABLE for persistent base tables', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F311', '03', 'CREATE VIEW', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F311', '04', 'CREATE VIEW: WITH CHECK OPTION', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F311', '05', 'GRANT statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('T321', '01', 'User-defined functions with no overloading', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('T321', '02', 'User-defined stored procedures with no overloading', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('T321', '03', 'Function invocation', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('T321', '04', 'CALL statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('T321', '05', 'RETURN statement', 'SQL/Foundation', true);
INSERT INTO sub_feature VALUES ('F021', '01', 'COLUMNS view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('F021', '02', 'TABLES view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('F021', '03', 'VIEWS view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('F021', '04', 'TABLE_CONSTRAINTS view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('F021', '05', 'REFERENTIAL_CONSTRAINTS view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('F021', '06', 'CHECK_CONSTRAINTS view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('F501', '01', 'SQL_FEATURES view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('F501', '02', 'SQL_SIZING view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('F501', '03', 'SQL_LANGUAGES view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('S011', '01', 'USER_DEFINED_TYPES view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('T321', '06', 'ROUTINES view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('T321', '07', 'PARAMETERS view', 'SQL/Schemata', true);
INSERT INTO sub_feature VALUES ('B032', '01', '<describe input statement>', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F034', '01', 'REVOKE statement performed by other than the owner of a schema object', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F034', '02', 'REVOKE statement: GRANT OPTION FOR clause', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F034', '03', 'REVOKE statement to revoke a privilege that the grantee has WITH GRANT OPTION', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F111', '01', 'READ UNCOMMITTED isolation level', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F111', '02', 'READ COMMITTED isolation level', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F111', '03', 'REPEATABLE READ isolation level', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F121', '01', 'GET DIAGNOSTICS statement', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F121', '02', 'SET TRANSACTION statement: DIAGNOSTICS SIZE clause', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F231', '01', 'TABLE_PRIVILEGES view', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F231', '02', 'COLUMN_PRIVILEGES view', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F231', '03', 'USAGE_PRIVILEGES view', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F302', '01', 'INTERSECT DISTINCT table operator', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F302', '02', 'INTERSECT ALL table operator', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F381', '01', 'ALTER TABLE statement: ALTER COLUMN clause', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F381', '02', 'ALTER TABLE statement: ADD CONSTRAINT clause', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F381', '03', 'ALTER TABLE statement: DROP CONSTRAINT clause', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F401', '01', 'NATURAL JOIN', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F401', '02', 'FULL OUTER JOIN', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F401', '04', 'CROSS JOIN', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F431', '01', 'FETCH with explicit NEXT', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F431', '02', 'FETCH FIRST', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F431', '03', 'FETCH LAST', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F431', '04', 'FETCH PRIOR', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F431', '05', 'FETCH ABSOLUTE', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F431', '06', 'FETCH RELATIVE', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F502', '01', 'SQL_SIZING_PROFILES view', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F502', '02', 'SQL_IMPLEMENTATION_INFO view', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F502', '03', 'SQL_PACKAGES view', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F831', '01', 'Updatable scrollable cursors', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('F831', '02', 'Updatable ordered cursors', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('S091', '01', 'Arrays of built-in data types', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('S091', '02', 'Arrays of distinct types', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('S091', '03', 'Array expressions', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('S201', '01', 'Array parameters', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('S201', '02', 'Array as result type of functions', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T041', '01', 'BLOB data type', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T041', '02', 'CLOB data type', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T041', '03', 'POSITION, LENGTH, LOWER, TRIM, UPPER, and SUBSTRING functions for LOB data types', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T041', '04', 'Concatenation of LOB data types', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T041', '05', 'LOB locator: non-holdable', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T211', '01', 'Triggers activated on UPDATE, INSERT, or DELETE of one base table.', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T211', '02', 'BEFORE triggers', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T211', '03', 'AFTER triggers', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T211', '04', 'FOR EACH ROW triggers', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T211', '05', 'Ability to specify a search condition that shall be True before the trigger is invoked.', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T211', '06', 'Support for run-time rules for the interaction of triggers and constraints.', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T211', '07', 'TRIGGER privilege', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('T211', '08', 'Multiple triggers for the same event are executed in the order in which they were created in the catalog.', 'SQL/Foundation', false);
INSERT INTO sub_feature VALUES ('P001', '01', '<SQL-server module definition>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P001', '02', '<drop module statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '01', '<compound statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '02', '<handler declaration>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '03', '<condition declaration>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '04', '<SQL variable declaration>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '05', '<assignment statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '06', '<case statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '07', '<if statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '08', '<iterate statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '09', '<leave statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '10', '<loop statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '11', '<repeat statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '12', '<while statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '13', '<for statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '14', '<signal statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '15', '<resignal statement>', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P002', '16', '<control statement>s as the SQL-statement of an externally-invoked procedure', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P003', '01', 'MODULES view', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P003', '02', 'MODULE_TABLE_USAGE view', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P003', '03', 'MODULE_COLUMN_USAGE view', 'SQL/PSM', false);
INSERT INTO sub_feature VALUES ('P003', '04', 'MODULE_PRIVILEGES view', 'SQL/PSM', false);

INSERT INTO package VALUES ('PKG001', 'Enhanced datetime facilities');
INSERT INTO package VALUES ('PKG002', 'Enhanced integrity management');
INSERT INTO package VALUES ('PKG004', 'PSM');
INSERT INTO package VALUES ('PKG006', 'Basic object support');
INSERT INTO package VALUES ('PKG007', 'Enhanced object support');
INSERT INTO package VALUES ('PKG008', 'Active database');
INSERT INTO package VALUES ('PKG010', 'OLAP');

INSERT INTO package_feature VALUES ('PKG001', 'F052');
INSERT INTO package_feature VALUES ('PKG001', 'F411');
INSERT INTO package_feature VALUES ('PKG001', 'F555');
INSERT INTO package_feature VALUES ('PKG002', 'F191');
INSERT INTO package_feature VALUES ('PKG002', 'F491');
INSERT INTO package_feature VALUES ('PKG002', 'F521');
INSERT INTO package_feature VALUES ('PKG002', 'F671');
INSERT INTO package_feature VALUES ('PKG002', 'F701');
INSERT INTO package_feature VALUES ('PKG002', 'T191');
INSERT INTO package_feature VALUES ('PKG002', 'T201');
INSERT INTO package_feature VALUES ('PKG002', 'T211');
INSERT INTO package_feature VALUES ('PKG002', 'T212');
INSERT INTO package_feature VALUES ('PKG004', 'P001');
INSERT INTO package_feature VALUES ('PKG004', 'P002');
INSERT INTO package_feature VALUES ('PKG004', 'P003');
INSERT INTO package_feature VALUES ('PKG004', 'T322');
INSERT INTO package_feature VALUES ('PKG006', 'S023');
INSERT INTO package_feature VALUES ('PKG006', 'S041');
INSERT INTO package_feature VALUES ('PKG006', 'S051');
INSERT INTO package_feature VALUES ('PKG006', 'S151');
INSERT INTO package_feature VALUES ('PKG006', 'T041');
INSERT INTO package_feature VALUES ('PKG007', 'S024');
INSERT INTO package_feature VALUES ('PKG007', 'S043');
INSERT INTO package_feature VALUES ('PKG007', 'S071');
INSERT INTO package_feature VALUES ('PKG007', 'S081');
INSERT INTO package_feature VALUES ('PKG007', 'S111');
INSERT INTO package_feature VALUES ('PKG007', 'S161');
INSERT INTO package_feature VALUES ('PKG007', 'S211');
INSERT INTO package_feature VALUES ('PKG007', 'S231');
INSERT INTO package_feature VALUES ('PKG008', 'T211');
INSERT INTO package_feature VALUES ('PKG010', 'T431');
INSERT INTO package_feature VALUES ('PKG010', 'T611');
