where dt.table_name = dtc.table_name and dt.table_name = uo.object_name and uo.object_type='TABLE'
<iftest="tableName != null and tableName.trim() != ''">
and dt.table_name like concat('%', UPPER(#{tableName}))
</if>
order by uo.CREATED desc
</select>
<selectid="queryTable"resultMap="tableMap">
select dt.table_name tableName,dtc.comments tableComment,dt.last_analyzed createTime from user_tables dt,user_tab_comments dtc where dt.table_name=dtc.table_name and dt.table_name = UPPER(#{tableName})
</select>
<selectid="queryColumns"resultMap="tableMap">
select temp.column_name columnname,
temp.data_type dataType,
temp.comments columnComment,
case temp.constraint_type when 'P' then 'PRI' when 'C' then 'UNI' else '' end "COLUMNKEY",
'' "EXTRA"
from (
select col.column_id,
col.column_name,
col.data_type,
colc.comments,
uc.constraint_type,
-- 去重
row_number() over (partition by col.column_name order by uc.constraint_type desc) as row_flg