String createProSql= "use quickstart\n"+
"DELIMITER $$\n"+
//"DROP PROCEDURE IF EXISTS findName $$\n"+
"CREATE PROCEDURE findName (inout name char(200),age int)\n"+
"BEGIN \n"+
"select username into name from user1 where userage=age;\n"+
"END $$\n"+
"DELIMITER ;";
sm.executeUpdate(createProSql);
总是执行错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $$
CREATE PROCEDURE findName (inout name char(200),age int)
BEGIN
sel' at line 2我怀疑是findname的错误,但是用引号括起来还是不行
请高手指教
"DELIMITER $$\n"+
//"DROP PROCEDURE IF EXISTS findName $$\n"+
"CREATE PROCEDURE findName (inout name char(200),age int)\n"+
"BEGIN \n"+
"select username into name from user1 where userage=age;\n"+
"END $$\n"+
"DELIMITER ;";
sm.executeUpdate(createProSql);
总是执行错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $$
CREATE PROCEDURE findName (inout name char(200),age int)
BEGIN
sel' at line 2我怀疑是findname的错误,但是用引号括起来还是不行
请高手指教
解决方案 »
- mysql的几个菜鸟问题,高手请进
- 数据库某个表碎片和状态均为Ignore是什么含义呢?
- mysql中有一个表用的是联合主键,在VS中调用mysql_real_query向数据库中插入数据,第二笔数据插不进去
- mysql正则表达式求助('@#4905#6#10034#A#3#10040#A#4#10033#A#3#1#2#0#2#1000#')
- 有用C语言开发mysql数据库的同事吗?问个结果集获取的问题。
- 设计一个表遇到的问题
- 在postgresql中如何将一个Integer的字段in到另一个integer[]类型的字段中?
- 在postgres中用触发器调用执行shell文件(外部程序)
- 有没有一个MySQL函数可以获取一个字符在字符串里的数量?
- 各位大侠,救命啊。我要急疯了!
- 装了MYSQL测试时出现的问题是怎么回事???
- mysql insert 到临时表 速度慢,如何优化
sm.executeUpdate(createProSql);
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $$
CREATE PROCEDURE findName (inout name char(200),age int)
BEGIN
sel' at line 2