存储过程的问题,我在phpadmin建立存储过程
create procedure user_login(inout name varchar(10),inout pwd varchar(10))
select * from tb_admin username=name and pwd=pwd
但是都是提示语法错误
MySQL 返回: #1064 - 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 '=name and pwd=pwd' at line 2

解决方案 »

  1.   

    select * from tb_admin username=name and pwd=pwd 
    ===>
    as 
    select * from tb_admin username='name' and pwd='pwd'
      

  2.   

    create procedure user_login(inout name varchar(20),inout pwd varchar(20))
    as 
    select * from tb_admin username='name' and pwd='pwd'提示错误是
    MySQL 返回: #1064 - 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 'as
    select * from tb_admin username='name' AND pwd='pwd'' at line 2 
      

  3.   

    SQL的存储过程要加AS,MYSQL.你不加试试