SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile MySQl Stored Procedure passing Parameters with parameter name and values

    IN MySQl Stored Procedure how to pass Parameters with parameter name and values i.e.

    DELIMITER //
    CREATE PROCEDURE GetOffice
    (countryName VARCHAR(255), countryId int(11))
    BEGIN
    SELECT city, phone
    FROM offices
    WHERE country = countryName AND
    country_id = countryId;
    END //
    DELIMITER ;


    CALL GetOffice("India",1);


    This works fine but i want it the way --------
    CALL GetOffice(countryName= "India",countryId=1);


    Is there any way to pass parameters to stored procedure along parameter names in MySql.

  2. #2
    SitePoint Guru
    Join Date
    Jan 2004
    Location
    Uppsala, sverige
    Posts
    697
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    No.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •