Home > database >  After using recursion detected data, how to judge whether an id in these data
After using recursion detected data, how to judge whether an id in these data

Time:10-08

I to incoming outside one parameter, whether it exists in recursion detected data
WITH TEMP AS
(
SELECT * FROM Document_FileType WHERE Id=18
UNION ALL
SELECT A. * FROM Document_FileType JOIN A TEMP ON Amy polumbo arentId=TEMP. Id
)
SELECT * FROM TEMP WHERE Id & lt;> 18

  • Related