Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java-JDBC: How to change column name of a Table

Java-JDBC: How to change column name of a Table
{filelink=7085}

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
public class Column_Update
 {
  public static void main(String[] argv) throws Exception
  {
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/Cours",
        "root", "***");
    Statement stmt = con.createStatement();
    int n = stmt.executeUpdate("ALTER TABLE Test CHANGE ID  ID_Student int");
  }
}

Users who found this page were searching for:

  • changing columns names in JDBC
  • perl addItem
  • mdi java tutorial
  • java formatting time

No comments yet.

Leave a Comment