我正在尝试将存储过程从 MS SQL 转换为 MySQL,因此在 MSSQL 中我使用默认值为 NULL 的参数
`ALTER PROCEDURE [dbo].[sp_GLB_Users_S]
(
@selType int =NULL,
@ID int =NULL,
@LoginID varchar(20) =NULL,
@UserCode varchar(50) =NULL,
@UserCategory int =NULL,
@UserName varchar(150) =NULL,
@EMail varchar(100) =NULL,
@IsActive bit =NULL
)`
如何在 MySQL 中使用 NULL 接受的参数
`CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_GLB_Users_S`(
IN selType INTEGER,
IN ID INTEGER,
IN LoginID VARCHAR(20),
IN UserCode VARCHAR(50),
IN UserCategory INTEGER,
IN UserName VARCHAR(150),
IN EMail VARCHAR(100),
IN IsActive BOOLEAN
)`