1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

MYSQL out parameter

Discussion in 'Databases' started by 2ofus, Jul 27, 2019.

  1. #1
    Iḿ very new to sql; I wrote the following stored procedure but I do not receive the out parameter with the correct result (allways null).
    ...................
    CREATE DEFINER=`myDB`@`localhost` PROCEDURE `testSP`(in _SN varchar(20), in _ProdLine int, out Result tinyint)
    BEGIN
      Declare exit handler for sqlexception select Result = 1;
      
      insert into testTB (DateTime, SN, ProdLine) values (Current_Timestamp(), _SN, _ProdLine);
      select Result = 0;
    END
    Code (markup):
    ..............
    Which error am I doing ?
    Thanks
    SEMrush
     
    Last edited by a moderator: Jul 27, 2019
    2ofus, Jul 27, 2019 IP
    SEMrush