主题:各位大虾,请问我的sql语句错在哪里?谢谢
create proc p_Students_conditions
(@Students_name char(10) , @department varchar(50) , @speciality_id char(8) ,
@grade int , @speciality varchar(20),@Students_id char(8) )
as
select * from ( select * from v_depa_spec
where ( department like '%@department%' and speciality like '%@speciality%'
and grade like '%@grade%' ) )
where ( Students_name like '%@Students_name%' and Students_id like '%@Students_id%' )
服务器: 消息 156,级别 15,状态 1,过程 p_Students_conditions,行 10
在关键字 'where' 附近有语法错误。
(@Students_name char(10) , @department varchar(50) , @speciality_id char(8) ,
@grade int , @speciality varchar(20),@Students_id char(8) )
as
select * from ( select * from v_depa_spec
where ( department like '%@department%' and speciality like '%@speciality%'
and grade like '%@grade%' ) )
where ( Students_name like '%@Students_name%' and Students_id like '%@Students_id%' )
服务器: 消息 156,级别 15,状态 1,过程 p_Students_conditions,行 10
在关键字 'where' 附近有语法错误。