利用PreparedStatement怎么执行多条SQL语句
答案:2 悬赏:50
解决时间 2021-03-22 23:13
- 提问者网友:伪情浪人
- 2021-03-22 04:15
利用PreparedStatement怎么执行多条SQL语句
最佳答案
- 二级知识专家网友:duile
- 2021-03-22 05:09
PrintPreviewDialog pPDlg;
exec_prefix='NONE'PACKAGE='libevent'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
exec_prefix='NONE'PACKAGE='libevent'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
全部回答
- 1楼网友:放肆的依賴
- 2021-03-22 05:19
靠谱,推荐大家使用。0202connection con = drivermanager.getconnection(url); debuglevel debug = debuglevel.on; string sql = "select name,rate from employeetable where rate > ?"; //use a factory instead of connection to get a preparedstatement. //preparedstatement ps = con.preparestatement(sql); preparedstatement ps = statementfactory.getstatement(con,sql,debug); ps.setint(1,25); //if ps is a debuggablestatement, you see the statement, //otherwise, an object identifier is displayed system.out.println(" debuggable statement= " + ps.tostring());0202附件是这段代码中用到的类。02020202020202
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯