Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 从oracle获取所有触发器名称_Java_Mysql - Fatal编程技术网

Java 从oracle获取所有触发器名称

Java 从oracle获取所有触发器名称,java,mysql,Java,Mysql,为什么选择空的结果集行 ResultSet row = dbmd.getTables("%", "dbuser1", "%", types); while (row.next()) { System.out.println(result.getString(1)); } 您可以使用以下代码: try { //must be upper case String username="dbuser1".toUpperCase(); ResultSet row =

为什么选择空的结果集行

 ResultSet row = dbmd.getTables("%", "dbuser1", "%", types);
 while (row.next()) {
   System.out.println(result.getString(1));
 }

您可以使用以下代码:

  try {
   //must be upper case
   String username="dbuser1".toUpperCase();

   ResultSet row = dbmd.getTables("%", username , "%", types);

    while (row.next()) {
      //you need table name for trigger name
      result.getString("TABLE_NAME");
    }
  //catch some errors
  } catch (SQLException e) {
      while (e != null) {
        System.out.println("\n Message: " + e.getMessage());
        System.out.println("\n SQLState: " + e.getSQLState());
        System.out.println("\n ErrorCode: " + e.getErrorCode());
        e = e.getNextException();
      }
   }

工作很好,非常感谢。我为什么选择-声誉?发布前搜索。祝您有个美好的一天。