Knocks/BackEnd/Knoks.Operate/Stored Procedures/REG_GetAccounts.sql

23 lines
475 B
SQL

CREATE PROCEDURE [REG_GetAccounts]
@AccountId BIGINT = NULL,
@UserId BIGINT = NULL
AS
SELECT
AccountId,
UserId,
Symbol,
CurrentBalance,
CurrentBonusBalance,
TotalPending,
CreateDate,
LastModifyDate,
LastModifyOrigin,
LastModifyOperatorId,
WalletAddress
FROM [Accounts] with (nolock)
WHERE
[Accounts].[AccountId] = ISNULL(@AccountId, [Accounts].[AccountId])
AND
[Accounts].[UserId] = ISNULL(@UserId, [Accounts].[UserId])
RETURN 0