Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey guys whats the wrong in thi smy sql procedure

it is not creating and give no error or warning

SQL
DELIMITER //
CREATE PROCEDURE GetMyxmlComplete(IN CCCourseId int) 
BEGIN 
SELECT course_master.Course_id,course_master.Course_name
from course_master  WHERE course_master.Course_id=CCCourseId
END // 
DELIMITER ;
Posted
Updated 26-Dec-13 8:54am
v2
Comments
Siva Hyderabad 26-Dec-13 7:45am    
I think u r not using 'AS' keyword before gegin
GDdixit 26-Dec-13 7:48am    
"AS" what is this bro ?
GDdixit 26-Dec-13 7:49am    
oho i tried this also but it's not working
Maciej Los 26-Dec-13 15:59pm    
Have you tried to call it after creation?

Your sql code looks good. I think stored procedure has been created. Check it using SHOW CREATE PROCEDURE[^] statement.


For further information, please see: MySQL Stored Procedure tutorial[^]
 
Share this answer
 
Hi try this format like

SQL
CREATE PROCEDURE GetMyxmlComplete(@CCCourseId int)
as
BEGIN
SELECT course_master.Course_id,course_master.Course_name
from course_master  WHERE course_master.Course_id=@CCCourseId
END
 
Share this answer
 
Comments
Maciej Los 27-Dec-13 2:08am    
"As" word is not necessary! Have a look into MySQL documentation.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900