+ },
+ { //MYSQL
+ "select "
+ + " a.table_name,"
+ + " replace(replace(a.table_comment, char(13), ''), char(10), '') as table_comments, "
+ + " b.column_name,"
+ + " replace(replace(b.column_comment, char(13), ''), char(10), '') as column_comment, "
+ + " b.column_type,"
+ + " b.character_maximum_length as data_precision,"
+ + " b.numeric_precision as data_precision,"
+ + " b.numeric_scale as data_scale,"
+ + " case b.is_nullable"
+ + " when 'NO' then '\81Z'"
+ + " else null "
+ + " end as nullable,"
+ + " column_default as data_default "
+ + "from "
+ + " information_schema.tables a,"
+ + " information_schema.columns b "
+ + "where "
+ + " a.table_schema = database()"
+ + " and a.table_type = 'BASE TABLE'"
+ + " and a.table_schema = b.table_schema "
+ + " and a.table_name = b.table_name "
+ + "order by a.table_name,b.ordinal_position",
+ "select "
+ + " a.table_name, "
+ + " b.constraint_name as index_name,"
+ + " '' as index_type, "
+ + " case b.constraint_type "
+ + " when 'PRIMARY KEY' then 'P' "
+ + " when 'UNIQUE' then 'U' "
+ + " end as constraint_type,"
+ + " c.column_name,"
+ + " c.ordinal_position as column_position"
+ + " from"
+ + " information_schema.tables a,"
+ + " information_schema.table_constraints b,"
+ + " information_schema.key_column_usage c"
+ + " where"
+ + " a.table_schema = database()"
+ + " and a.table_type = 'BASE TABLE'"
+ + " and a.table_schema = b.table_schema"
+ + " and a.table_name = b.table_name"
+ + " and b.table_schema = c.table_schema"
+ + " and b.table_name = c.table_name"
+ + " and b.constraint_name = c.constraint_name"
+ + " and b.constraint_type in('PRIMARY KEY','UNIQUE')"
+ + " union select"
+ + " a.table_name,"
+ + " a.index_name,"
+ + " b.index_type as index_type, "
+ + " '' as constraint_type,"
+ + " a.column_name,"
+ + " a.seq_in_index as column_position"
+ + " from"
+ + " information_schema.statistics a,"
+ + " information_schema.statistics b"
+ + " where"
+ + " a.table_schema = database()"
+ + " and a.table_schema = b.table_schema"
+ + " and a.table_name = b.table_name"
+ + " and a.index_name = b.index_name"
+ + " and a.non_unique = 1"
+ + " order by table_name,index_name,column_position",
+ "select "
+ + " a.table_name as view_name, "
+ + " '' as comments "
+ + "from "
+ + " information_schema.views a "
+ + " where"
+ + " table_schema = database()"
+ + " order by "
+ + " a.table_name",
+ "select "
+ + " routine_name as object_name, "
+ + " routine_type as object_type, "
+ + " '' as action_timing, "
+ + " '' as event_action, "
+ + " '' as event_object "
+ + " from "
+ + " information_schema.routines "
+ + " where"
+ + " routine_schema = database()"
+ + " and (routine_type = 'PROCEDURE' or routine_type = 'FUNCTION') "
+ + " union select "
+ + " trigger_name as object_name, "
+ + " 'TRIGGER' as object_type, "
+ + " action_timing as action_timing, "
+ + " event_manipulation as event_action, "
+ + " event_object_table as event_object "
+ + " from "
+ + " information_schema.triggers "
+ + " where"
+ + " trigger_schema = database()"
+ + " order by object_name,object_type ",
+ "",
+ "",
+ "",
+ "select distinct "
+ + " b.table_name, "
+ + " b.constraint_name, "
+ + " b.column_name, "
+ + " b.ordinal_position as position, "
+ + " b.referenced_table_name as r_table_name, "
+ + " b.referenced_column_name as r_column_name, "
+ + " c.ordinal_position as r_position "
+ + " from "
+ + " information_schema.referential_constraints a, "
+ + " information_schema.key_column_usage b, "
+ + " information_schema.columns c "
+ + " where "
+ + " a.constraint_schema = database() "
+ + " and a.constraint_schema = b.constraint_schema "
+ + " and a.constraint_name = b.constraint_name "
+ + " and b.referenced_table_name = c.table_name "
+ + " and b.referenced_column_name = c.column_name "