Mysql错误记录

     1.创建存储过程时候制定的类型不可以是varchar,不然会报:[Err] 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 ')

 

create procedure query_sal(v_job varchar)

  

   2.调用存储过程时,如果类型不一致,会报各种错误:

     1)创建存储过程时候指定了错误的类型是不会报错的,如下指定类型为float

create procedure query_sal(v_job float) 

         调用时 call query_sal('salesman') 报错:

               [SQL] call query_sal('salesman')   [Err] 1265 - Data truncated for column 'v_job' at row 342

     2)指定类型为char,而调用类型为数字格式时:

        [SQL] call query_sal(12)   [Err] 1406 - Data too long for column 'v_job' at row 342

你可能感兴趣的:(mysql,数据库报错)