META-INF.dbv.dameng.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <database xmlns="http://polaris.pivoto.cn/schema/dbv/database" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://polaris.pivoto.cn/schema/dbv/database database.xsd"> <sqls> <sql id="selectIndexesForTable"> select a.owner index_schem, a.index_name, a.index_type, a.uniqueness, a.table_owner table_schem, a.table_name, a.tablespace_name, b.column_name from sys.all_indexes a,sys.all_ind_columns b where a.index_name=b.index_name and a.owner=b.index_owner and a.table_name=b.table_name #if(${schema}) and a.owner=upper('${schema}') and b.index_owner=upper('${schema}') #end #if(${tableName}) and a.table_name=upper('${tableName}') and b.table_name=upper('${tableName}') #end order by a.owner,a.table_name,a.index_name,b.column_position </sql> <!-- C = check constraint on a table (注: not null is one of check constraints) P = primary key U = unique key R = referential integrity V = with check option, on a view O = with read only, on a view --> <sql id="selectConstraintsForTable"> select a.owner "schema", a.constraint_name, a.constraint_type, a.table_name, b.column_name, b.position from all_constraints a, all_cons_columns b where a.constraint_name=b.constraint_name and a.table_name=b.table_name #if(${schema}) and a.owner=upper('${schema}') and b.owner=upper('${schema}') #end #if(${tableName}) and a.table_name=upper('${tableName}') and b.table_name=upper('${tableName}') #end order by a.table_name,a.constraint_name,b.position </sql> </sqls> </database>