试试
select gradeid,IsNull(coursefirst,N'无') from 
Graduate Left Join FosterProject 
On Graduate,spectialtyid=FosterProject.spectialtyid 
Where FosterProject.courseid=@courseid

解决方案 »

  1.   

    不好意思,错了一点。select gradeid,IsNull(coursefirst,N'无') from 
    Graduate Left Join FosterProject 
    On Graduate,spectialtyid=FosterProject.spectialtyid 
    And FosterProject.courseid=@courseid测试过的。
      

  2.   

    晕,你写的语句居然有一个"."号写为了","号,再改改。declare @courseid nvarchar(10)
    set @courseid='HSS502'select gradeid,IsNull(coursefirst,N'无') from 
    Graduate Left Join FosterProject 
    On Graduate.spectialtyid=FosterProject.spectialtyid 
    And FosterProject.courseid=@courseid