Skip to content

Commit 791486e

Browse files
committed
Return explicit column list
While it shouldn't hurt anything here since `ValidateHierarchy` is not expected to be called by code, but rather by humans, we should maintain best practices by returning an explicit list of columns instead of relying on wildcards. Otherwise, if the column list or order changes in the table, the output of the procedure will change. Explicitly listing the columns (and order) helps insulate downstream consumers from such potential changes in the future.
1 parent 609ff0e commit 791486e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

OnTopic.Data.Sql.Database/Stored Procedures/ValidateHierarchy.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ AS
2020
--------------------------------------------------------------------------------------------------------------------------------
2121
PRINT 'Detect range overlaps'
2222

23-
SELECT *
23+
SELECT TopicID,
24+
RangeLeft,
25+
RangeRight
2426
FROM Topics OuterTopics
2527
WHERE (
2628
SELECT COUNT(TopicID)

0 commit comments

Comments
 (0)