帮忙解释一下。
ALTER FUNCTION [dbo].[GetBranch] (
@ac_id int
)
RETURNS TABLE
AS
RETURN
(
WITH cte (ac_id) AS
(
SELECT ac_id
FROM ArticleClass
WHERE ac_id = @ac_id
UNION ALL
SELECT a.ac_id
FROM ArticleClass a
INNER JOIN cte c
ON a.parent_id = c.ac_id
)
SELECT ac_id FROM cte
)