java逻辑删除数据库所有表的包含某个外键的行

  • Post author:
  • Post category:java


import java.sql.DriverManager;

import java.sql.SQLException;

import com.mysql.jdbc.Connection;

import com.mysql.jdbc.PreparedStatement;

import com.mysql.jdbc.ResultSet;

public class JDBCTest {






public static void main(String[] args) {



String driverName = “com.mysql.jdbc.Driver”;



String url = “jdbc:mysql://127.0.0.1:3306/hrm”;



String username = “root”;



String password = “root”;



String fKeyColumn = “adeptid”;



String fKeyColumnValue = “2331”;




版权声明:本文为oskyhg原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。