mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
19 lines
387 B
MySQL
19 lines
387 B
MySQL
|
CREATE OR ALTER PROCEDURE [dbo].[ProviderOrganization_ReadCountByOrganizationIds]
|
||
|
@Ids AS [dbo].[GuidIdArray] READONLY
|
||
|
AS
|
||
|
BEGIN
|
||
|
SET NOCOUNT ON
|
||
|
|
||
|
IF (SELECT COUNT(1) FROM @Ids) < 1
|
||
|
BEGIN
|
||
|
RETURN(-1)
|
||
|
END
|
||
|
|
||
|
SELECT
|
||
|
COUNT(1)
|
||
|
FROM
|
||
|
[dbo].[ProviderOrganizationView]
|
||
|
WHERE
|
||
|
[OrganizationId] IN (SELECT [Id] FROM @Ids)
|
||
|
END
|
||
|
GO
|