Click here to Skip to main content
12,399,048 members (59,457 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: MySQL
hi all,

how to write a syntax for excute the procedure in mysql.

in sql server 2008

exec 'procedure_name' parameter1,'parameter2','parameter3'

same query how to execute in mysql or phpmyadmin


please help me
Posted 21-Jan-13 5:23am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Depending on type of parameter, the call changes a little.
Input parameter: CALL sp_in('Something');
Output parameter: CALL sp_out(@x);
Inout parameter: CALL sp_inout(12);

Refer: MySQL Stored Procedures: Part 1[^]
  Permalink  
Comments
Santhosh23 21-Jan-13 11:34am
   
hi sandeep, this is my query
CREATE PROCEDURE `SP_GETBLOGS`(_MODE INT,_BLOGNAME VARCHAR(100),_DESCRIPTION longtext,_BLOGID INT,_BLOGSUBJECT varchar(100),_ADMINNAME Varchar(1000))
BEGIN
IF(_MODE=1) then
SELECT BLOGID,BLOGNAME, DESCRIPTION,BLOGSUBJECT,POSTEDDATE,ADMINNAME FROM blogpostbyadmin order by BLOGID desc ;
END if;

how write a syntax for my code.
please help me
Sandeep Mewara 21-Jan-13 11:37am
   
Can you please try by yourself before that? I gave an example and link to read, please check it.
Santhosh23 21-Jan-13 11:40am
   
how to cal mode parameter.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160721.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100