i have one table.i.e Employee.my empoyee table having 22columns.
i used below code.but i got error
DELIMITER $$
CREATE PROCEDURE sp_search ( )
begin
declare str varchar(255);
set str="select * from Employee";
EXEC(str);
end $$
DELIMITER ;
i have one table.i.e Employee.my empoyee table having 22columns.
i used below code.but i got error
DELIMITER $$
CREATE PROCEDURE sp_search ( )
begin
declare str varchar(255);
set str="select * from Employee";
EXEC(str);
end $$
DELIMITER ;
I don't find an "EXEC" statement in the MySQL manual. Do you?
Depending on your aims, maybe you should have a look at prepared statements in MySQL.
See also: http://forums.mysql.com/read.php?98,19285,19285#msg-19285
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.