在MySql中创存储过程出错 请各位帮忙看一下
MySql版本是5.1的create procedure proc_bb
@a nvarchar(200),
@b nvarchar(200)
AS
declare @sql nvarchar(5000)
set @sql='select * from bb where 1=1'
if @b<>''
begin
set @sql+=' and b='''+@b+''' '
end
if @a<>''
begin
set @sql+=' and a='''+@a+''' '
end
报的错误提示:
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 '@a nvarchar(200),
@b nvarchar(200)
AS
declare @sql nvarchar(5000)
set @sql='' at line 2
页:
[1]