bugnet_component_getcomponentbyid.sql
来自「BugNET is an issue tracking and project 」· SQL 代码 · 共 22 行
SQL
22 行
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[BugNet_Component_GetComponentById]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[BugNet_Component_GetComponentById]
GO
CREATE PROCEDURE [dbo].[BugNet_Component_GetComponentById]
@ComponentId int
AS
SELECT
ComponentId,
ProjectId,
Name,
ParentComponentId,
(SELECT COUNT(*) FROM Component WHERE ParentComponentId=c.ComponentId) ChildCount
FROM Component c
WHERE
ComponentId = @ComponentId
GO
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?