I want write proceduce have parameter which have default value if no value pass to it, something like this:
CREATE DEFINER = 'root'@'localhost'
PROCEDURE client_logging_system.Proc_client_Get(IN in_clientID INT DEFAULT 1)
COMMENT '
-- Proc for get user
-- Parameter:
-- in_clientID: ID of client
'
BEGIN
SELECT c.ID, c.Name, c.BrokerID, c.LoginID, c.Password, c.`GroupID`, c.Quanity, c.ApiKey, c.ToTp FROM `client` c
WHERE c.ID = in_clientID;
END
Any one have suggestion about this problem?