Commit 793adda4 authored by 张永's avatar 张永

加视图

parent 45502daa
......@@ -52,6 +52,22 @@ public class SqlServerTo {
}
}
public void executeView() {
try {
String sql = "SELECT TABLE_NAME , 'REMARK' AS TABLE_COMMENT FROM INFORMATION_SCHEMA.VIEWS";
PreparedStatement pStemt = conn.prepareStatement(sql);
ResultSet set = pStemt.executeQuery();
while(set.next()) {
String name = set.getString("TABLE_NAME").trim();
String comment = set.getString("TABLE_COMMENT");
execute(name, comment);
}
conn.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public void executeFilter(String sign) {
try {
String sql = "SELECT D.name AS TABLE_NAME, 'REMARK' AS TABLE_COMMENT FROM sysobjects AS D WHERE D.XTYPE = 'U' AND D.NAME <> 'dtproperties'";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment