Click here to Skip to main content
11,705,052 members (50,294 online)
Rate this: bad
good
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 at 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 at 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 at 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
0 Sergey Alexandrovich Kryukov 609
1 OriginalGriff 439
2 Andy Lanng 215
3 CPallini 202
4 F-ES Sitecore 160
0 OriginalGriff 8,958
1 Sergey Alexandrovich Kryukov 8,276
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,606


Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2015
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