TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rachayita jaiswal
NA
217
106.4k
MySql Stored Procedure
Jul 4 2013 11:39 PM
Hi, I am creating a stored procedure for Insert and Select data in MySql , my stored procedure is -
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`(_action varchar(10) ,File varchar(100))
BEGIN
if _action = 'INSERT' then
insert into tab_file (File) values (File);
end if;
if _action = 'select' then
select ID,File from tab_file;
end if;
END
With this stored procedure i am able to insert data but select query is not working.It is giving error like "Expected 2,got 1"
Please help me how to write stored procedure in mysql forselect, insert, update and delete scripts?
Thanks
Reply
Answers (
11
)
Select query for processing natural language in jsp with mdb
Cannot Connect To MYSQL DB From Shared Folder