How to remove null rows from sql query result?

2019-05-01 12:04发布

I have a SQL query in which I am getting some records. Query is:

    select c.Id, c.FirstName, dbo.GetClientStaffContacts(c.Id, '27,31') as Staff from Client c order by c.Id

Result is: enter image description here

I want only those rows that are not having null values in column Staff.

Any help would be appreciated. Thank you.

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-05-01 12:13
select 
  c.Id, c.FirstName, dbo.GetClientStaffContacts(c.Id, '27,31') as Staff 
from 
  Client c 
where
  dbo.GetClientStaffContacts(c.Id, '27,31') is not null
order 
  by c.Id
查看更多
登录 后发表回答