ulivegenov

/* 08. Non-Directory Files */

Oct 13th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. SELECT p.Id,
  2. p.[Name],
  3. CAST(p.Size AS VARCHAR) + 'KB' AS Size
  4. FROM Files AS p
  5. LEFT JOIN Files AS f ON f.ParentId = p.Id
  6. WHERE f.Id IS NULL
  7. ORDER BY p.Id, p.[Name], P.Size
Advertisement
Add Comment
Please, Sign In to add comment