Hello!
I'm new in MYSQL.
I'm trying to migrate some MS Sql Stored Procedures in MySql. Here is the MSSQL stored procedure.
My problem is the in translating the last part of this SP. I need the number of affectes rows by the first part of SP.
The following code is not accepted as a correct one.
Any help will be appreciated! Thx
I'm new in MYSQL.
I'm trying to migrate some MS Sql Stored Procedures in MySql. Here is the MSSQL stored procedure.
Code:
CREATE PROCEDURE CB_UserLogin
(
@User nvarchar(50),
@Pass nvarchar(50),
@ID_Util int OUTPUT
)
AS
SELECT
@ID_Util = fID_Util
FROM
tblUtiliz
WHERE
fUtilizator = @User
AND
fParola = @Pass
IF @@Rowcount < 1
SELECT
@ID_Util = 0
My problem is the in translating the last part of this SP. I need the number of affectes rows by the first part of SP.
The following code is not accepted as a correct one.
Any help will be appreciated! Thx
Code:
CREATE PROCEDURE CB_UserLogin
(
VUser varchar(50),
VPass varchar(50),
OUT VID_Util int
)
begin
SELECT
@ID_Util = fID_Util
FROM
tblUtiliz
WHERE
fUtilizator = @User
AND
fParola = @Pass;
IF Row_count() < 1 then @ID_Util = 0
end if;
end;