{"text_format":"2","workbook":"xlsx","n_sheets":10,"sheets":["Mysql","Oracle","达梦","金仓","神通","Sqlite","GBase","OpenGauss","Postgresql","DB2"],"not_rendered":{"charts":0,"images":0,"macros":0,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"run_cost":"one","rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Mysql","index":0,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[36,0,40,0],[20,0,29,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nSELECT\n    SCHEMA_NAME ownerName,\n    DEFAULT_CHARACTER_SET_NAME ownerCharacterSetName,\n    DEFAULT_COLLATION_NAME ownerCollationName\nFROM information_schema.schemata\nORDER BY SCHEMA_NAME\n"]
[null,"OwnerSelect","\nSELECT\n    SCHEMA_NAME ownerName,\n    DEFAULT_CHARACTER_SET_NAME ownerCharacterSetName,\n    DEFAULT_COLLATION_NAME ownerCollationName\nFROM information_schema.schemata\nWHERE SCHEMA_NAME={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate","\nCREATE DATABASE [IF NOT EXISTS] {ownerNamePack}\n[CHARACTER SET {ownerCharacterSetName}]\n[COLLATE {ownerCollationName}]\n"]
[null,"OwnerDelete","\nDROP DATABASE IF EXISTS {ownerNamePack}\n"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nSELECT\n    TABLE_NAME tableName,\n    TABLE_COMMENT tableComment,\n    TABLE_SCHEMA ownerName\nFROM information_schema.tables\nWHERE TABLE_SCHEMA={sqlValuePack(ownerName)}\nORDER BY TABLE_NAME\n"]
[null,"TableSelect","\nSELECT\n    TABLE_NAME tableName,\n    TABLE_COMMENT tableComment,\n    TABLE_SCHEMA ownerName\nFROM information_schema.tables\nWHERE TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}.]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)[CHARACTER SET {tableCharacterSetName}]\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)} [COMMENT {sqlValuePack(columnComment)}]\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE IF EXISTS [{ownerNamePack}.]{tableNamePack}\n"]
[null,"TableComment","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} COMMENT {sqlValuePack(tableComment)}"]
[null,"TableRename","\nALTER TABLE [{ownerNamePack}.]{oldTableNamePack} RENAME AS {tableNamePack}\n"]
[]
[]
["字段","ColumnsSelect","\nSELECT\n    COLUMN_NAME columnName,\n    COLUMN_COMMENT columnComment,\n    COLUMN_DEFAULT columnDefault,\n    EXTRA columnExtra,\n    TABLE_NAME tableName,\n    TABLE_SCHEMA ownerName,\n    CHARACTER_SET_NAME columnCharacterSetName,\n    IS_NULLABLE isNullable,\n    DATA_TYPE columnDataType,\n    COLUMN_TYPE columnType,\n    DATETIME_PRECISION DATETIME_PRECISION,\n    NUMERIC_PRECISION NUMERIC_PRECISION,\n    NUMERIC_SCALE NUMERIC_SCALE,\n    CHARACTER_MAXIMUM_LENGTH CHARACTER_MAXIMUM_LENGTH\nFROM information_schema.columns\nWHERE TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"ColumnSelect","\nSELECT\n    COLUMN_NAME columnName,\n    COLUMN_COMMENT columnComment,\n    COLUMN_DEFAULT columnDefault,\n    EXTRA columnExtra,\n    TABLE_NAME tableName,\n    TABLE_SCHEMA ownerName,\n    CHARACTER_SET_NAME columnCharacterSetName,\n    IS_NULLABLE isNullable,\n    DATA_TYPE columnDataType,\n    COLUMN_TYPE columnType\nFROM information_schema.columns\nWHERE TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n  AND COLUMN_NAME={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD COLUMN {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)} [COMMENT {sqlValuePack(columnComment)}] [AFTER {columnAfterColumnPack}]\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment"]
[null,"ColumnRename"]
[null,"ColumnUpdate","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} CHANGE COLUMN {oldColumnNamePack} {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)} [COMMENT {sqlValuePack(columnComment)}] [AFTER {columnAfterColumnPack}]\n"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect","\nSELECT\n    t2.COLUMN_NAME columnName,\n    t1.TABLE_NAME tableName,\n    t1.TABLE_SCHEMA ownerName\nFROM information_schema.table_constraints t1\nLEFT JOIN information_schema.key_column_usage t2 \nON (t2.CONSTRAINT_NAME=t1.CONSTRAINT_NAME AND t2.TABLE_SCHEMA=t1.TABLE_SCHEMA AND t2.TABLE_NAME=t1.TABLE_NAME)\nWHERE t1.TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND t1.TABLE_NAME={sqlValuePack(tableName)}\n  AND t1.CONSTRAINT_TYPE='PRIMARY KEY'\n"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}.]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}.]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect","\nSELECT\n    t1.INDEX_NAME indexName,\n    t1.COLUMN_NAME columnName,\n    t1.INDEX_COMMENT indexComment,\n    t1.NON_UNIQUE nonUnique,\n    t1.TABLE_NAME tableName,\n    t1.TABLE_SCHEMA ownerName,\n    t2.CONSTRAINT_TYPE\nFROM information_schema.statistics t1\nLEFT JOIN information_schema.table_constraints t2 \nON (t2.CONSTRAINT_NAME=t1.INDEX_NAME AND t2.TABLE_SCHEMA=t1.TABLE_SCHEMA AND t2.TABLE_NAME=t1.TABLE_NAME)\nWHERE t1.TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND t1.TABLE_NAME={sqlValuePack(tableName)}\n  AND (t2.CONSTRAINT_TYPE !='PRIMARY KEY' OR t2.CONSTRAINT_TYPE = '' OR t2.CONSTRAINT_TYPE IS NULL)\n"]
[null,"IndexAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD {indexType} [{indexNamePack}] ({columnNamesPack}) [COMMENT {sqlValuePack(indexComment)}]\n"]
[null,"IndexDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"Oracle","index":1,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[20,0,29,0],[36,0,40,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nSELECT \n\tUSERNAME ownerName\nFROM DBA_USERS \nORDER BY USERNAME\n"]
[null,"OwnerSelect","\nSELECT \n\tUSERNAME ownerName\nFROM DBA_USERS \nWHERE USERNAME={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate","\nCREATE USER {ownerName} IDENTIFIED BY {doubleQuotationMarksPack(ownerPassword)};\nGRANT dba,resource,connect TO {ownerName};\n"]
[null,"OwnerDelete","\nDROP USER {ownerName} CASCADE\n"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nSELECT \n\tTABLE_NAME tableName,\n\tOWNER ownerName\nFROM ALL_TABLES\nWHERE OWNER={sqlValuePack(ownerName)}\nORDER BY TABLE_NAME "]
[null,"TableSelect","\nSELECT \n\tTABLE_NAME tableName,\n\tOWNER ownerName\nFROM ALL_TABLES\nWHERE OWNER={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}.]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE [{ownerNamePack}.]{tableNamePack}\n"]
[null,"TableComment","\nCOMMENT ON TABLE [{ownerNamePack}.]{tableNamePack} IS {sqlValuePack(tableComment)}\n"]
[null,"TableRename","\nALTER TABLE [{ownerNamePack}.]{oldTableNamePack} RENAME TO {tableNamePack}\n"]
[]
[]
["字段","ColumnsSelect","\nSELECT \n\tt.COLUMN_NAME columnName,\n\tt.DATA_DEFAULT columnDefault,\n\tt.CHARACTER_SET_NAME columnCharacterSetName,\n\tt.NULLABLE isNullable,\n\tt.DATA_TYPE columnDataType,\n\tt.DATA_LENGTH,\n\tt.DATA_PRECISION,\n\tt.DATA_SCALE,\n\ttc.COMMENTS columnComment,\n\tt.TABLE_NAME tableName,\n\tt.OWNER ownerName\nFROM ALL_TAB_COLUMNS t\nLEFT JOIN ALL_COL_COMMENTS tc ON(tc.OWNER=t.OWNER AND tc.TABLE_NAME=t.TABLE_NAME AND tc.COLUMN_NAME=t.COLUMN_NAME)\nWHERE t.OWNER={sqlValuePack(ownerName)}\n    AND t.TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"ColumnSelect","\nSELECT \n\tt.COLUMN_NAME columnName,\n\tt.DATA_DEFAULT columnDefault,\n\tt.CHARACTER_SET_NAME columnCharacterSetName,\n\tt.NULLABLE isNullable,\n\tt.DATA_TYPE columnDataType,\n\tt.DATA_LENGTH,\n\tt.DATA_PRECISION,\n\tt.DATA_SCALE,\n\ttc.COMMENTS columnComment,\n\tt.TABLE_NAME tableName,\n\tt.OWNER ownerName\nFROM ALL_TAB_COLUMNS t\nLEFT JOIN ALL_COL_COMMENTS tc ON(tc.OWNER=t.OWNER AND tc.TABLE_NAME=t.TABLE_NAME AND tc.COLUMN_NAME=t.COLUMN_NAME)\nWHERE t.OWNER={sqlValuePack(ownerName)}\n    AND t.TABLE_NAME={sqlValuePack(tableName)}\n    AND t.COLUMN_NAME={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment","\nCOMMENT ON COLUMN [{ownerNamePack}.]{tableNamePack}.{columnNamePack} IS {sqlValuePack(columnComment)}\n"]
[null,"ColumnRename","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} RENAME COLUMN {oldColumnNamePack} TO {columnNamePack}\n"]
[null,"ColumnUpdate","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} MODIFY {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect","\nSELECT \n    t1.COLUMN_NAME columnName,\n    t2.TABLE_NAME tableName,\n    t2.OWNER ownerName\nFROM ALL_CONS_COLUMNS t1\nLEFT JOIN ALL_CONSTRAINTS t2 ON (t2.CONSTRAINT_NAME = t1.CONSTRAINT_NAME)\nWHERE t2.OWNER={sqlValuePack(ownerName)}\n\tAND t2.TABLE_NAME={sqlValuePack(tableName)}\n\tAND t2.CONSTRAINT_TYPE = 'P'\n"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}.]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}.]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect","\nSELECT \n    t1.INDEX_NAME indexName,\n    t1.COLUMN_NAME columnName,\n    t1.TABLE_OWNER ownerName,\n    t1.TABLE_NAME tableName,\n    t2.UNIQUENESS \nFROM ALL_IND_COLUMNS t1\nLEFT JOIN ALL_INDEXES t2 ON (t2.INDEX_NAME = t1.INDEX_NAME)\nLEFT JOIN ALL_CONSTRAINTS t3 ON (t3.CONSTRAINT_NAME = t1.INDEX_NAME)\nWHERE t1.TABLE_OWNER={sqlValuePack(ownerName)}\n\tAND t1.TABLE_NAME={sqlValuePack(tableName)}\n\tAND (t3.CONSTRAINT_TYPE !='P' OR t3.CONSTRAINT_TYPE = '' OR t3.CONSTRAINT_TYPE IS NULL)\n"]
[null,"IndexAdd","\nCREATE {indexType} [{indexNamePack}] ON [{ownerNamePack}.]{tableNamePack} ({columnNamesPack})\n"]
[null,"IndexDelete","\nDROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"达梦","index":2,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[20,0,29,0],[36,0,40,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nSELECT \n\tUSERNAME ownerName\nFROM DBA_USERS \nORDER BY USERNAME\n"]
[null,"OwnerSelect","\nSELECT \n\tUSERNAME ownerName\nFROM DBA_USERS \nWHERE USERNAME={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate","\nCREATE USER {doubleQuotationMarksPack(ownerName)} IDENTIFIED BY {doubleQuotationMarksPack(ownerPassword)};\nGRANT DBA TO {doubleQuotationMarksPack(ownerName)};\n"]
[null,"OwnerDelete","\nDROP USER {ownerName} CASCADE\n"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nSELECT \n\tTABLE_NAME tableName,\n\tOWNER ownerName\nFROM ALL_TABLES\nWHERE OWNER={sqlValuePack(ownerName)}\nORDER BY TABLE_NAME \n"]
[null,"TableSelect","\nSELECT \n\tTABLE_NAME tableName,\n\tOWNER ownerName\nFROM ALL_TABLES\nWHERE OWNER={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}.]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE [{ownerNamePack}.]{tableNamePack}\n"]
[null,"TableComment","\nCOMMENT ON TABLE [{ownerNamePack}.]{tableNamePack} IS {sqlValuePack(tableComment)}\n"]
[null,"TableRename","\nALTER TABLE [{ownerNamePack}.]{oldTableNamePack} RENAME TO {tableNamePack}\n"]
[]
[]
["字段","ColumnsSelect","\nSELECT \n\tt.COLUMN_NAME columnName,\n\tt.DATA_DEFAULT columnDefault,\n\tt.CHARACTER_SET_NAME columnCharacterSetName,\n\tt.NULLABLE isNullable,\n\tt.DATA_TYPE columnDataType,\n\tt.DATA_LENGTH,\n\tt.DATA_PRECISION,\n\tt.DATA_SCALE,\n\ttc.COMMENTS columnComment,\n\tt.TABLE_NAME tableName,\n\tt.OWNER ownerName\nFROM ALL_TAB_COLUMNS t\nLEFT JOIN ALL_COL_COMMENTS tc ON(tc.OWNER=t.OWNER AND tc.TABLE_NAME=t.TABLE_NAME AND tc.COLUMN_NAME=t.COLUMN_NAME)\nWHERE t.OWNER={sqlValuePack(ownerName)}\n    AND t.TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"ColumnSelect","\nSELECT \n\tt.COLUMN_NAME columnName,\n\tt.DATA_DEFAULT columnDefault,\n\tt.CHARACTER_SET_NAME columnCharacterSetName,\n\tt.NULLABLE isNullable,\n\tt.DATA_TYPE columnDataType,\n\tt.DATA_LENGTH,\n\tt.DATA_PRECISION,\n\tt.DATA_SCALE,\n\ttc.COMMENTS columnComment,\n\tt.TABLE_NAME tableName,\n\tt.OWNER ownerName\nFROM ALL_TAB_COLUMNS t\nLEFT JOIN ALL_COL_COMMENTS tc ON(tc.OWNER=t.OWNER AND tc.TABLE_NAME=t.TABLE_NAME AND tc.COLUMN_NAME=t.COLUMN_NAME)\nWHERE t.OWNER={sqlValuePack(ownerName)}\n    AND t.TABLE_NAME={sqlValuePack(tableName)}\n    AND t.COLUMN_NAME={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment","\nCOMMENT ON COLUMN [{ownerNamePack}.]{tableNamePack}.{columnNamePack} IS {sqlValuePack(columnComment)}\n"]
[null,"ColumnRename","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} RENAME COLUMN {oldColumnNamePack} TO {columnNamePack}\n"]
[null,"ColumnUpdate","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} MODIFY {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect","\nSELECT \n    t1.COLUMN_NAME columnName,\n    t2.TABLE_NAME tableName,\n    t2.OWNER ownerName\nFROM ALL_CONS_COLUMNS t1\nLEFT JOIN ALL_CONSTRAINTS t2 ON (t2.CONSTRAINT_NAME = t1.CONSTRAINT_NAME)\nWHERE t2.OWNER={sqlValuePack(ownerName)}\n\tAND t2.TABLE_NAME={sqlValuePack(tableName)}\n\tAND t2.CONSTRAINT_TYPE = 'P'\n"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}.]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}.]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect","\nSELECT \n    t1.INDEX_NAME indexName,\n    t1.COLUMN_NAME columnName,\n    t1.TABLE_OWNER ownerName,\n    t1.TABLE_NAME tableName,\n    t2.UNIQUENESS \nFROM ALL_IND_COLUMNS t1\nLEFT JOIN ALL_INDEXES t2 ON (t2.INDEX_NAME = t1.INDEX_NAME)\nLEFT JOIN ALL_CONSTRAINTS t3 ON (t3.CONSTRAINT_NAME = t1.INDEX_NAME)\nWHERE t1.TABLE_OWNER={sqlValuePack(ownerName)}\n\tAND t1.TABLE_NAME={sqlValuePack(tableName)}\n\tAND (t3.CONSTRAINT_TYPE !='P' OR t3.CONSTRAINT_TYPE = '' OR t3.CONSTRAINT_TYPE IS NULL)\n"]
[null,"IndexAdd","\nCREATE {indexType} [{indexNamePack}] ON [{ownerNamePack}.]{tableNamePack} ({columnNamesPack})\n"]
[null,"IndexDelete","\nDROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"金仓","index":3,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[20,0,29,0],[36,0,40,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nSELECT\n    SCHEMA_NAME ownerName\nFROM information_schema.schemata\nORDER BY SCHEMA_NAME\n"]
[null,"OwnerSelect","\nSELECT\n    SCHEMA_NAME ownerName\nFROM information_schema.schemata\nWHERE SCHEMA_NAME={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate","\nCREATE USER {ownerName} WITH PASSWORD {sqlValuePack(ownerPassword)};\nCREATE SCHEMA {ownerName};\nGRANT USAGE ON SCHEMA {ownerName} TO {ownerName};\nGRANT ALL ON SCHEMA {ownerName} TO {ownerName};\nGRANT ALL ON ALL TABLES IN SCHEMA {ownerName} TO {ownerName};\n"]
[null,"OwnerDelete","\nDROP SCHEMA IF EXISTS {ownerName} CASCADE;\nDROP USER IF EXISTS {ownerName};\n"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nSELECT\n    TABLE_NAME tableName,\n    TABLE_SCHEMA ownerName\nFROM information_schema.tables\nWHERE TABLE_SCHEMA={sqlValuePack(ownerName)}\nORDER BY TABLE_NAME\n"]
[null,"TableSelect","\nSELECT\n    TABLE_NAME tableName,\n    TABLE_SCHEMA ownerName\nFROM information_schema.tables\nWHERE TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}.]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE [{ownerNamePack}.]{tableNamePack}\n"]
[null,"TableComment","\nCOMMENT ON TABLE [{ownerNamePack}.]{tableNamePack} IS {sqlValuePack(tableComment)}\n"]
[null,"TableRename","\nALTER TABLE [{ownerNamePack}.]{oldTableNamePack} RENAME TO {tableNamePack}\n"]
[]
[]
["字段","ColumnsSelect","\n\nSELECT\n    COLUMN_NAME columnName,\n    COLUMN_DEFAULT columnDefault,\n    TABLE_NAME tableName,\n    TABLE_SCHEMA ownerName,\n    IS_NULLABLE isNullable,\n    DATA_TYPE columnDataType,\n    DATETIME_PRECISION DATETIME_PRECISION,\n    NUMERIC_PRECISION NUMERIC_PRECISION,\n    NUMERIC_SCALE NUMERIC_SCALE,\n    CHARACTER_MAXIMUM_LENGTH CHARACTER_MAXIMUM_LENGTH\nFROM information_schema.columns\nWHERE TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n\n"]
[null,"ColumnSelect","SELECT\n    COLUMN_NAME columnName,\n    COLUMN_DEFAULT columnDefault,\n    TABLE_NAME tableName,\n    TABLE_SCHEMA ownerName,\n    IS_NULLABLE isNullable,\n    DATA_TYPE columnDataType,\n    NUMERIC_PRECISION NUMERIC_PRECISION,\n    NUMERIC_SCALE NUMERIC_SCALE,\n    CHARACTER_MAXIMUM_LENGTH CHARACTER_MAXIMUM_LENGTH\nFROM information_schema.columns\nWHERE TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n  AND COLUMN_NAME={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment","\nCOMMENT ON COLUMN [{ownerNamePack}.]{tableNamePack}.{columnNamePack} IS {sqlValuePack(columnComment)}\n"]
[null,"ColumnRename","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} RENAME COLUMN {oldColumnNamePack} TO {columnNamePack}\n"]
[null,"ColumnUpdate","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ALTER COLUMN {columnNamePack} TYPE {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n\n"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect","\nSELECT\n    t2.COLUMN_NAME columnName,\n    t1.TABLE_NAME tableName,\n    t1.TABLE_SCHEMA ownerName\nFROM information_schema.table_constraints t1\nLEFT JOIN information_schema.key_column_usage t2 \nON (t2.CONSTRAINT_NAME=t1.CONSTRAINT_NAME AND t2.TABLE_SCHEMA=t1.TABLE_SCHEMA AND t2.TABLE_NAME=t1.TABLE_NAME)\nWHERE t1.TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND t1.TABLE_NAME={sqlValuePack(tableName)}\n  AND t1.CONSTRAINT_TYPE='PRIMARY KEY'\n"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}.]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}.]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect","\nSELECT \n    t1.INDEX_NAME indexName,\n    t1.COLUMN_NAME columnName,\n    t1.TABLE_OWNER ownerName,\n    t1.TABLE_NAME tableName,\n    t2.UNIQUENESS \nFROM ALL_IND_COLUMNS t1\nLEFT JOIN ALL_INDEXES t2 ON (t2.INDEX_NAME = t1.INDEX_NAME)\nLEFT JOIN ALL_CONSTRAINTS t3 ON (t3.CONSTRAINT_NAME = t1.INDEX_NAME)\nWHERE t1.INDEX_NAME IN(\n    SELECT INDEXNAME \n    FROM SYS_CATALOG.sys_indexes \n    WHERE SCHEMANAME={sqlValuePack(ownerName)}\n        AND TABLENAME={sqlValuePack(tableName)}\n) \n\tAND t1.INDEX_NAME NOT IN(\n    SELECT\n    t1.CONSTRAINT_NAME\nFROM information_schema.table_constraints t1\nWHERE t1.TABLE_SCHEMA={sqlValuePack(ownerName)}\n  AND t1.TABLE_NAME={sqlValuePack(tableName)}\n  AND t1.CONSTRAINT_TYPE='PRIMARY KEY'\n)\n"]
[null,"IndexAdd","\nCREATE {indexType} [{indexNamePack}] ON [{ownerNamePack}.]{tableNamePack} ({columnNamesPack})\n"]
[null,"IndexDelete","\nDROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"神通","index":4,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[20,0,29,0],[36,0,40,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nSELECT \n\tUSERNAME ownerName\nFROM DBA_USERS \nORDER BY USERNAME\n"]
[null,"OwnerSelect","\nSELECT \n\tUSERNAME ownerName\nFROM DBA_USERS \nWHERE USERNAME={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate","\nCREATE USER {ownerName} WITH PASSWORD {sqlValuePack(ownerPassword)};\n"]
[null,"OwnerDelete","\nDROP USER {ownerName} CASCADE\n"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nSELECT \n\tTABLE_NAME tableName,\n\tOWNER ownerName\nFROM ALL_TABLES\nWHERE OWNER={sqlValuePack(ownerName)}\nORDER BY TABLE_NAME \n"]
[null,"TableSelect","\nSELECT \n\tTABLE_NAME tableName,\n\tOWNER ownerName\nFROM ALL_TABLES\nWHERE OWNER={sqlValuePack(ownerName)}\n  AND TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}.]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE [{ownerNamePack}.]{tableNamePack}\n"]
[null,"TableComment","\nCOMMENT ON TABLE [{ownerNamePack}.]{tableNamePack} IS {sqlValuePack(tableComment)}\n"]
[null,"TableRename","\nALTER TABLE [{ownerNamePack}.]{oldTableNamePack} RENAME TO {tableNamePack}\n"]
[]
[]
["字段","ColumnsSelect","\nSELECT \n\tt.COLUMN_NAME columnName,\n\tt.DATA_DEFAULT columnDefault,\n\tt.CHARACTER_SET_NAME columnCharacterSetName,\n\tt.NULLABLE isNullable,\n\tt.DATA_TYPE columnDataType,\n\tt.DATA_LENGTH,\n\tt.DATA_PRECISION,\n\tt.DATA_SCALE,\n\ttc.COMMENTS columnComment,\n\tt.TABLE_NAME tableName,\n\tt.OWNER ownerName\nFROM ALL_TAB_COLUMNS t\nLEFT JOIN ALL_COL_COMMENTS tc ON(tc.OWNER=t.OWNER AND tc.TABLE_NAME=t.TABLE_NAME AND tc.COLUMN_NAME=t.COLUMN_NAME)\nWHERE t.OWNER={sqlValuePack(ownerName)}\n    AND t.TABLE_NAME={sqlValuePack(tableName)}\n"]
[null,"ColumnSelect","\nSELECT \n\tt.COLUMN_NAME columnName,\n\tt.DATA_DEFAULT columnDefault,\n\tt.CHARACTER_SET_NAME columnCharacterSetName,\n\tt.NULLABLE isNullable,\n\tt.DATA_TYPE columnDataType,\n\tt.DATA_LENGTH,\n\tt.DATA_PRECISION,\n\tt.DATA_SCALE,\n\ttc.COMMENTS columnComment,\n\tt.TABLE_NAME tableName,\n\tt.OWNER ownerName\nFROM ALL_TAB_COLUMNS t\nLEFT JOIN ALL_COL_COMMENTS tc ON(tc.OWNER=t.OWNER AND tc.TABLE_NAME=t.TABLE_NAME AND tc.COLUMN_NAME=t.COLUMN_NAME)\nWHERE t.OWNER={sqlValuePack(ownerName)}\n    AND t.TABLE_NAME={sqlValuePack(tableName)}\n    AND t.COLUMN_NAME={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment","\nCOMMENT ON COLUMN [{ownerNamePack}.]{tableNamePack}.{columnNamePack} IS {sqlValuePack(columnComment)}\n"]
[null,"ColumnRename","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} RENAME COLUMN {oldColumnNamePack} TO {columnNamePack}\n"]
[null,"ColumnUpdate","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} MODIFY {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect","\nSELECT \n    t1.COLUMN_NAME columnName,\n    t2.TABLE_NAME tableName,\n    t2.OWNER ownerName\nFROM ALL_CONS_COLUMNS t1\nLEFT JOIN ALL_CONSTRAINTS t2 ON (t2.CONSTRAINT_NAME = t1.CONSTRAINT_NAME)\nWHERE t2.OWNER={sqlValuePack(ownerName)}\n\tAND t2.TABLE_NAME={sqlValuePack(tableName)}\n\tAND t2.CONSTRAINT_TYPE = 'P'\n"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}.]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}.]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect","\nSELECT \n    t1.INDEX_NAME indexName,\n    t1.COLUMN_NAME columnName,\n    t1.TABLE_OWNER ownerName,\n    t1.TABLE_NAME tableName,\n    t2.UNIQUENESS \nFROM ALL_IND_COLUMNS t1\nLEFT JOIN ALL_INDEXES t2 ON (t2.INDEX_NAME = t1.INDEX_NAME)\nLEFT JOIN ALL_CONSTRAINTS t3 ON (t3.CONSTRAINT_NAME = t1.INDEX_NAME)\nWHERE t1.TABLE_OWNER={sqlValuePack(ownerName)}\n\tAND t1.TABLE_NAME={sqlValuePack(tableName)}\n\tAND (t3.CONSTRAINT_TYPE !='P' OR t3.CONSTRAINT_TYPE = '' OR t3.CONSTRAINT_TYPE IS NULL)\n"]
[null,"IndexAdd","\nCREATE {indexType} [{indexNamePack}] ON [{ownerNamePack}.]{tableNamePack} ({columnNamesPack})\n"]
[null,"IndexDelete","\nDROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"Sqlite","index":5,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[20,0,29,0],[36,0,40,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nSELECT \n\tname ownerName\nFROM pragma_database_list AS t_i \nORDER BY name\n"]
[null,"OwnerSelect","\nSELECT \n\tname ownerName\nFROM pragma_database_list AS t_i \nWHERE name={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate"]
[null,"OwnerDelete"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nSELECT \n\tname tableName,\n    sql \nFROM sqlite_master \nWHERE type ='table'\nORDER BY name\n"]
[null,"TableSelect","\nSELECT \n\tname tableName,\n    sql \nFROM sqlite_master \nWHERE type ='table'\n  AND name={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}.]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE IF EXISTS [{ownerName}.]{tableName}\n"]
[null,"TableComment"]
[null,"TableRename","\nALTER TABLE [{ownerName}.]{oldTableName} RENAME AS {newTableName}\n"]
[]
[]
["字段","ColumnsSelect","\nSELECT \n\tname columnName,\n\tdflt_value columnDefault,\n\t\"notnull\" isNotNull,\n\ttype columnType\nFROM pragma_table_info({tableNamePack}) AS t_i \n"]
[null,"ColumnSelect","\nSELECT \n\tname columnName,\n\tdflt_value columnDefault,\n\t\"notnull\" isNotNull,\n\ttype columnType\nFROM pragma_table_info({tableNamePack}) AS t_i \nWHERE name={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD COLUMN {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment"]
[null,"ColumnRename","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} RENAME COLUMN {oldColumnNamePack} TO {columnNamePack}\n"]
[null,"ColumnUpdate"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect","\nSELECT \n\ta.name indexName,\n\tb.name columnName \nFROM pragma_index_list({tableNamePack}) AS a,pragma_index_info(a.name) b \nWHERE a.origin = \"pk\"\n"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}.]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}.]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect","\nSELECT \n\ta.name indexName,\n\ta.\"unique\" isUnique,\n\tb.name columnName \nFROM pragma_index_list({tableNamePack}) AS a,pragma_index_info(a.name) b \nWHERE a.origin != \"pk\"\n"]
[null,"IndexAdd","\nCREATE {indexType} [{indexNamePack}] ON {tableNamePack}({columnNamesPack})\n"]
[null,"IndexDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"GBase","index":6,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[20,0,29,0],[36,0,40,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nselect  trim(name) as \"ownerName\" \nfrom sysmaster:sysdatabases\nORDER BY name\n"]
[null,"OwnerSelect","\nselect  trim(name) as \"ownerName\" \nfrom sysmaster:sysdatabases\nWHERE name={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate"]
[null,"OwnerDelete","\nDROP DATABASE {ownerName}\n"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nselect  trim(tabname) as \"tableName\"\n from {ownerNamePack}:systables \nORDER BY tabname"]
[null,"TableSelect","\nselect  trim(tabname) as \"tableName\"\n from {ownerNamePack}:systables \nWHERE\n  tabname={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}:]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE [{ownerNamePack}:]{tableNamePack}\n"]
[null,"TableComment","\nCOMMENT ON TABLE [{ownerNamePack}:]{tableNamePack} IS {sqlValuePack(tableComment)}\n"]
[null,"TableRename","\nALTER TABLE [{ownerNamePack}:]{oldTableNamePack} RENAME TO {tableNamePack}\n"]
[]
[]
["字段","ColumnsSelect","\n\nselect \n  trim(t.tabname) as \"tableName\",\n  trim(c.colname) as \"columnName\",\n  trim(d.default) as \"columnDefault\",\n  get_colname(c.coltype ,c.collength ,c.extended_id ,1 ) as \"columnType\",\n  cs_null.constrtype  as notNull,\n  c.collength as \"DATA_LENGTH\",\n  c.colno as sortNo\n from {ownerNamePack}:systables t\n left join {ownerNamePack}:syscolumns c on c.tabid = t.tabid\n left join {ownerNamePack}:sysdefaults d on (t.tabid = d.tabid and c.colno = d.colno)\n left join {ownerNamePack}:syscoldepend cd on (c.tabid = cd.tabid and c.colno = cd.colno)\n left join {ownerNamePack}:sysxtdtypes xt on c.extended_id = xt.extended_id\n left join {ownerNamePack}:sysseclabels e on c.seclabelid = e.seclabelid\n left join {ownerNamePack}:sysconstraints cs_null on (cd.tabid = cs_null.tabid and cd.constrid = cs_null.constrid  and cs_null.constrtype = 'N')\nWHERE\n    t.tabname={sqlValuePack(tableName)}\n"]
[null,"ColumnSelect","\n\nselect \n  trim(t.tabname) as \"tableName\",\n  trim(c.colname) as \"columnName\",\n  trim(d.default) as \"columnDefault\",\n  get_colname(c.coltype ,c.collength ,c.extended_id ,1 ) as \"columnType\",\n  cs_null.constrtype  as notNull,\n  c.collength as \"DATA_LENGTH\",\n  c.colno as sortNo\n from {ownerNamePack}:systables t\n left join {ownerNamePack}:syscolumns c on c.tabid = t.tabid\n left join {ownerNamePack}:sysdefaults d on (t.tabid = d.tabid and c.colno = d.colno)\n left join {ownerNamePack}:syscoldepend cd on (c.tabid = cd.tabid and c.colno = cd.colno)\n left join {ownerNamePack}:sysxtdtypes xt on c.extended_id = xt.extended_id\n left join {ownerNamePack}:sysseclabels e on c.seclabelid = e.seclabelid\n left join {ownerNamePack}:sysconstraints cs_null on (cd.tabid = cs_null.tabid and cd.constrid = cs_null.constrid  and cs_null.constrtype = 'N')\nWHERE\n    t.tabname={sqlValuePack(tableName)}\n    AND t.colname={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}:]{tableNamePack} ADD {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}:]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment","\nCOMMENT ON COLUMN [{ownerNamePack}:]{tableNamePack}.{columnNamePack} IS {sqlValuePack(columnComment)}\n"]
[null,"ColumnRename","\nALTER TABLE [{ownerNamePack}:]{tableNamePack} RENAME COLUMN {oldColumnNamePack} TO {columnNamePack}\n"]
[null,"ColumnUpdate","\nALTER TABLE [{ownerNamePack}:]{tableNamePack} MODIFY {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}:]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}:]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect"]
[null,"IndexAdd","\nCREATE {indexType} [{indexNamePack}] ON [{ownerNamePack}:]{tableNamePack} ({columnNamesPack})\n"]
[null,"IndexDelete","\nDROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"OpenGauss","index":7,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[20,0,29,0],[36,0,40,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nselect schema_name \"ownerName\"\nfrom information_schema.schemata\nORDER BY schema_name\n"]
[null,"OwnerSelect","\nselect schema_name \"ownerName\"\nfrom information_schema.schemata\nWHERE schema_name={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate","\nCREATE USER {ownerName} WITH SYSADMIN PASSWORD {doubleQuotationMarksPack(ownerPassword)};\n"]
[null,"OwnerDelete","\nDROP USER IF EXISTS {ownerName} CASCADE\n"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nSELECT \ntable_schema \"ownerName\",\ntable_name \"tableName\"\nFROM information_schema.tables\nWHERE table_schema={sqlValuePack(ownerName)}\nORDER BY table_name "]
[null,"TableSelect","\nSELECT \ntable_schema \"ownerName\",\ntable_name \"tableName\"\nFROM information_schema.tables\nWHERE table_schema={sqlValuePack(ownerName)}\n  AND table_name={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}.]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE [{ownerNamePack}.]{tableNamePack}\n"]
[null,"TableComment","\nCOMMENT ON TABLE [{ownerNamePack}.]{tableNamePack} IS {sqlValuePack(tableComment)}\n"]
[null,"TableRename","\nALTER TABLE [{ownerNamePack}.]{oldTableNamePack} RENAME TO {tableNamePack}\n"]
[]
[]
["字段","ColumnsSelect","\nSELECT\n   table_schema \"ownerName\",\n   table_name \"tableName\",\n   column_name \"columnName\",\n   column_default \"columnDefault\",\n    is_nullable \"isNullable\",\n    data_type \"columnDataType\",\n    numeric_precision \"NUMERIC_PRECISION\",\n    numeric_scale \"NUMERIC_SCALE\",\n    character_maximum_length \"CHARACTER_MAXIMUM_LENGTH\"\nFROM information_schema.columns\nWHERE table_schema={sqlValuePack(ownerName)}\n  AND table_name={sqlValuePack(tableName)}\n"]
[null,"ColumnSelect","\nSELECT\n   table_schema \"ownerName\",\n   table_name \"tableName\",\n   column_name \"columnName\",\n   column_default \"columnDefault\",\n    is_nullable \"isNullable\",\n    data_type \"columnDataType\",\n    numeric_precision \"NUMERIC_PRECISION\",\n    numeric_scale \"NUMERIC_SCALE\",\n    character_maximum_length \"CHARACTER_MAXIMUM_LENGTH\"\nFROM information_schema.columns\nWHERE table_schema={sqlValuePack(ownerName)}\n  AND table_name={sqlValuePack(tableName)}\n    AND column_name={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment","\nCOMMENT ON COLUMN [{ownerNamePack}.]{tableNamePack}.{columnNamePack} IS {sqlValuePack(columnComment)}\n"]
[null,"ColumnRename","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} RENAME COLUMN {oldColumnNamePack} TO {columnNamePack}\n"]
[null,"ColumnUpdate","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} MODIFY {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect","\nselect\n\tpg_attribute.attname as \"columnName\",\n\tpg_namespace.nspname  as \"ownerName\",\n\tpg_class.relname as \"tableName\"\nfrom\n\tpg_constraint\ninner join pg_class on\n\tpg_constraint.conrelid = pg_class.oid\ninner join pg_attribute on\n\tpg_attribute.attrelid = pg_class.oid\n\tand pg_attribute.attnum = any(pg_constraint.conkey)\ninner join pg_type on\n\tpg_type.oid = pg_attribute.atttypid\ninner join pg_namespace on\n\tpg_namespace.oid = pg_class.relnamespace\nwhere\n\tpg_constraint.contype = 'p'\n    AND pg_namespace.nspname={sqlValuePack(ownerName)}\n    AND pg_class.relname={sqlValuePack(tableName)}\n"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}.]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}.]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect","\nSELECT\n    na.nspname \"ownerName\",\n    cl.relname \"tableName\",\n    co.conname \"indexName\",\n    co.contype,\n    pg_indexes.indexdef,\n    co.conkey,  --主键字段排序码（pg_attribute.attnum）\n    co.confkey  --外键字段排序码（pg_attribute.attnum）\nFROM pg_catalog.pg_class cl\n     join pg_catalog.pg_namespace na on cl.relnamespace = na.oid\n     join pg_constraint co on co.conrelid = cl.oid\n     join pg_indexes on pg_indexes.indexname = co.conname\n\nWHERE co.contype!='p'\n    AND na.nspname={sqlValuePack(ownerName)}\n    AND cl.relname={sqlValuePack(tableName)}\n"]
[null,"IndexAdd","\nCREATE {indexType} [{indexNamePack}] ON [{ownerNamePack}.]{tableNamePack} ({columnNamesPack})\n"]
[null,"IndexDelete","\nDROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"Postgresql","index":8,"n_rows":42,"n_cols":4,"rows_kept":42,"cut":false,"hidden":false,"merged":[[1,0,9,0],[41,0,45,0],[10,0,19,0],[20,0,29,0],[36,0,40,0],[30,0,35,0]]}
["类型","名称","SQL","说明"]
["库|模式|所属者","OwnersSelect","\nselect schema_name \"ownerName\"\nfrom information_schema.schemata\nORDER BY schema_name\n"]
[null,"OwnerSelect","\nselect schema_name \"ownerName\"\nfrom information_schema.schemata\nWHERE schema_name={sqlValuePack(ownerName)}\n"]
[null,"OwnerCreate","\nCREATE USER {ownerName} WITH SYSADMIN PASSWORD {doubleQuotationMarksPack(ownerPassword)};\n"]
[null,"OwnerDelete","\nDROP USER IF EXISTS {ownerName} CASCADE\n"]
[]
[]
[]
[]
[]
["表","TablesSelect","\nSELECT \ntable_schema \"ownerName\",\ntable_name \"tableName\"\nFROM information_schema.tables\nWHERE table_schema={sqlValuePack(ownerName)}\nORDER BY table_name "]
[null,"TableSelect","\nSELECT \ntable_schema \"ownerName\",\ntable_name \"tableName\"\nFROM information_schema.tables\nWHERE table_schema={sqlValuePack(ownerName)}\n  AND table_name={sqlValuePack(tableName)}\n"]
[null,"TableCreate","\nCREATE TABLE [{ownerNamePack}.]{tableNamePack}(\n{ tableCreateColumnContent }\n{ tableCreatePrimaryKeyContent }\n)\n"]
[null,"TableCreateColumn","\n\t{columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"TableCreatePrimaryKey","\nPRIMARY KEY ({primaryKeysPack})\n"]
[null,"TableDelete","\nDROP TABLE [{ownerNamePack}.]{tableNamePack}\n"]
[null,"TableComment","\nCOMMENT ON TABLE [{ownerNamePack}.]{tableNamePack} IS {sqlValuePack(tableComment)}\n"]
[null,"TableRename","\nALTER TABLE [{ownerNamePack}.]{oldTableNamePack} RENAME TO {tableNamePack}\n"]
[]
[]
["字段","ColumnsSelect","\nSELECT\n   table_schema \"ownerName\",\n   table_name \"tableName\",\n   column_name \"columnName\",\n   column_default \"columnDefault\",\n    is_nullable \"isNullable\",\n    data_type \"columnDataType\",\n    numeric_precision \"NUMERIC_PRECISION\",\n    numeric_scale \"NUMERIC_SCALE\",\n    character_maximum_length \"CHARACTER_MAXIMUM_LENGTH\"\nFROM information_schema.columns\nWHERE table_schema={sqlValuePack(ownerName)}\n  AND table_name={sqlValuePack(tableName)}\n"]
[null,"ColumnSelect","\nSELECT\n   table_schema \"ownerName\",\n   table_name \"tableName\",\n   column_name \"columnName\",\n   column_default \"columnDefault\",\n    is_nullable \"isNullable\",\n    data_type \"columnDataType\",\n    numeric_precision \"NUMERIC_PRECISION\",\n    numeric_scale \"NUMERIC_SCALE\",\n    character_maximum_length \"CHARACTER_MAXIMUM_LENGTH\"\nFROM information_schema.columns\nWHERE table_schema={sqlValuePack(ownerName)}\n  AND table_name={sqlValuePack(tableName)}\n    AND column_name={sqlValuePack(columnName)}\n"]
[null,"ColumnAdd","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} ADD {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnDelete","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} DROP COLUMN {columnNamePack}\n"]
[null,"ColumnComment","\nCOMMENT ON COLUMN [{ownerNamePack}.]{tableNamePack}.{columnNamePack} IS {sqlValuePack(columnComment)}\n"]
[null,"ColumnRename","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} RENAME COLUMN {oldColumnNamePack} TO {columnNamePack}\n"]
[null,"ColumnUpdate","\nALTER TABLE [{ownerNamePack}.]{tableNamePack} MODIFY {columnNamePack} {columnTypePack} [DEFAULT {columnDefaultPack}] {columnNotNull(columnNotNull)}\n"]
[null,"ColumnAfter"]
[]
[]
["主键","PrimaryKeysSelect","\nselect\n\tpg_attribute.attname as \"columnName\",\n\tpg_namespace.nspname  as \"ownerName\",\n\tpg_class.relname as \"tableName\"\nfrom\n\tpg_constraint\ninner join pg_class on\n\tpg_constraint.conrelid = pg_class.oid\ninner join pg_attribute on\n\tpg_attribute.attrelid = pg_class.oid\n\tand pg_attribute.attnum = any(pg_constraint.conkey)\ninner join pg_type on\n\tpg_type.oid = pg_attribute.atttypid\ninner join pg_namespace on\n\tpg_namespace.oid = pg_class.relnamespace\nwhere\n\tpg_constraint.contype = 'p'\n    AND pg_namespace.nspname={sqlValuePack(ownerName)}\n    AND pg_class.relname={sqlValuePack(tableName)}\n"]
[null,"PrimaryKeyAdd","\nALTER TABLE [{ownerName}.]{tableName} ADD PRIMARY KEY ({columnNamesPack})\n"]
[null,"PrimaryKeyDelete","\nALTER TABLE [{ownerName}.]{tableName} DROP PRIMARY KEY\n"]
[]
[]
[]
["索引","IndexesSelect","\nSELECT\n    na.nspname \"ownerName\",\n    cl.relname \"tableName\",\n    co.conname \"indexName\",\n    co.contype,\n    pg_indexes.indexdef,\n    co.conkey,  --主键字段排序码（pg_attribute.attnum）\n    co.confkey  --外键字段排序码（pg_attribute.attnum）\nFROM pg_catalog.pg_class cl\n     join pg_catalog.pg_namespace na on cl.relnamespace = na.oid\n     join pg_constraint co on co.conrelid = cl.oid\n     join pg_indexes on pg_indexes.indexname = co.conname\n\nWHERE co.contype!='p'\n    AND na.nspname={sqlValuePack(ownerName)}\n    AND cl.relname={sqlValuePack(tableName)}\n"]
[null,"IndexAdd","\nCREATE {indexType} [{indexNamePack}] ON [{ownerNamePack}.]{tableNamePack} ({columnNamesPack})\n"]
[null,"IndexDelete","\nDROP INDEX {indexNamePack}\n"]
[null,"IndexNamePack"]
[]
["外键"]

{"sheet":"DB2","index":9,"n_rows":0,"n_cols":0,"rows_kept":0,"cut":false,"hidden":false,"merged":[]}