我刚刚看了API好象不行,
executeUpdate
public int executeUpdate(String sql)
                  throws SQLExceptionExecutes an SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed.
Parameters:
sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
Returns:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
Throws:
SQLException - if a database access error occurs用JDBC里的哪个函数来创建表啊

解决方案 »

  1.   

    这个可以啊,别忙着看API,试试先
      

  2.   

    没有问题。完全可以。
    你安装别人的论坛的时候,就需要创建表。就是直接用executeUpdate建的
      

  3.   

    注意看api
    an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
    关键是SQL statement that returns nothing。
    create table也是不返回结果的sql语句啊
      

  4.   

    executeUpdate
    public int executeUpdate(String sql)
                      throws SQLExceptionExecutes an SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed.
    Parameters:
    sql - an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing
    Returns:
    either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
    Throws:
    SQLException - if a database access error occurs
      

  5.   

    executeUpdate()
    execute()
    都可以