Skip to content

Commit

Permalink
Oracle的表名按字母排序
Browse files Browse the repository at this point in the history
  • Loading branch information
zouzg committed Dec 25, 2018
1 parent 74bef58 commit 12e9f18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/zzg/mybatis/generator/util/DbUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static List<String> getTableNames(DatabaseConfig config) throws Exception
DatabaseMetaData md = connection.getMetaData();
ResultSet rs;
if (DbType.valueOf(config.getDbType()) == DbType.SQL_Server) {
String sql = "select name from sysobjects where xtype='u' or xtype='v' ";
String sql = "select name from sysobjects where xtype='u' or xtype='v' order by name";
rs = connection.createStatement().executeQuery(sql);
while (rs.next()) {
tables.add(rs.getString("name"));
Expand Down

0 comments on commit 12e9f18

Please sign in to comment.