I have a stored procedure (see below) that take out all articles based on @ParentId. It works good, but some articles has ParentId = NULL in the database. When @ParentID = Null or nothing, it dont return the articles with parentId = NULL. What is wrong, how can I get the articles with ParentId = NULL?
ALTER PROCEDURE [dbo].[spGetContentsForTreeview]
@ParentId int = null
SELECT Id, [Name] FROM tblContent WHERE ParentId=@ParentId