java调用sqlserver存储过程问题
以下两种:
CallableStatement stat = con.prepareCall("call procname(?,?)");
stat.execute()
or
PrepareStatment stat = con.prepareCall("Exec procname ?,?");
rs = stat.executeQuery();
视图调用同表一样!,这个问题记得之前的远标学到过的,希望对你有所帮助
怎么在mysql命令行执行一个sql文件
使用source命令执行sql脚本。进入mysql的控制台后,使用source命令执行Mysql>source 【sql脚本文件的路径全名】具体步骤:假设运行sql脚本是hello.sql,在控制台下输入:mysql>source c:\hello world\hello.sql(注意路径不用加引号) 或者 \. c:\hello world\hello.sql然后回车即可
如何在sqlplus中,执行sql文件
举个例子,假设你的sql文件是test.sql ,保存路径是D:\script,那么在sqlplus里执行它,用如下语法: sqlplus> @D:\script\test.sql 这是windows环境下的方法,linux类似,简单来说,就是“@” 加上完整文件名(绝对路径+文件名+文件扩展名)

