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 [email=b=]b='''+@b+'''[/email] '
end
if @a<>''
begin
set @sql+=' and [email=a=]a='''+@a+'''[/email] '
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 [email=]'@a[/email] nvarchar(200),
@b nvarchar(200)
AS
declare @sql nvarchar(5000)
set @sql='' at line 2