什么是带参???
UPDATE product SET name = 'abc' WHERE commid =1 and rebate=5是不是指这里带参WHERE commid =1 and rebate=5   ?????????//?

解决方案 »

  1.   

    第一个方法
    createStatement() 
              Creates a Statement object for sending SQL statements to the database. 
    第二个方法
    createStatement(int resultSetType, int resultSetConcurrency) 
              Creates a Statement object that will generate ResultSet objects with the given type and concurrency. 
    第三个方法
    createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) 
              Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability. prepareStatement这个用法差不多
    这个东西不应该问人的...应该自己看的...
      

  2.   

    int resultSetType
    结果集类型
    ResultSet.TYPE_SCROLL_INSENSITIVE(可前后移,但对别人修改不敏感的,可以说是静态游标)
    ResultSet.TYPE_SCROLL_SENSITIVE(对别人修改的敏感,动态游标)
    ResultSet.TYPE_FORWARD_ONLY (只向前)(TYPE开头的)
    int resultSetConcurrency
    游标类型
    ResultSet.CONCUR_UPDATABLE(可修改的)
    ResultSet.CONCUR_READ_ONLY (只读的)int resultSetHoldability
    提交方式吧(这个我不曾用过)
    以上三个都的ResultSet的静态属性
    Statement stmt = con.createStatement(
                                          ResultSet.TYPE_SCROLL_INSENSITIVE,
                                          ResultSet.CONCUR_UPDATABLE);这个例子就是定义了一个静态的,可更新的Statement
    如果是
    Statement stmt = con.createStatement();
    就是一个只读只向前的了API上面说得很清楚...
    好累啊.....