/**
* 获取MySql数据库下所有的表名
*
* @param dbName 数据库名称
* @return
*/
public static String getMySqlAllTableName(String dbName) {
return "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='" + dbName + "'and Table_type='BASE TABLE'";
}
/**
* 获取Oracle数据库下所有的表名
*
* @return
*/
public static String getOracleAllTableName() {
return "select table_name from user_tables order by table_name";
}
/**
* 获取sqlite数据库中所有表名
*
* @return
*/
public static String getSqliteTables() {
return "select name from sqlite_master where type='table' and name<>'sqlite_sequence'";
}
/**
* 获取sqlServer数据库中所有表名
*
* @return
*/
public static String getSqlServerTables() {
return "select Name from SysObjects Where XType='U' order by Name";
}
/**
* 获取PostgreSql数据库中所有表名
*
* @return
*/
public static String getPostgreSqlTables() {
return "SELECT table_name FROM information_schema.tables WHERE table_schema ='public AND table_type ='BASE TABLE'";
}