MySQL Forums
Forum List  »  Spanish

Procedimientos Almacenados
Posted by: Elvis Montezuma
Date: August 20, 2006 09:35AM

Hola a Todos, tengo un procedimiento almacenado que ejecuta una sencilla sentencia SELECT. (Ver ejemplo). Queria saber como se pueden concatenar una sentencia select de un procedimiento almacenado con un parametro de entrada que contiene la cláusula WHERE que deseo aplicar en la sentencia.

Ejemplo:

CREATE PROCEDURE Consultar (IN Cwhere varchar(20))
BEGIN
DECLARE CadenaW varchar(20);
select * from Tabla + Cwhere; <-- Cwhere contiene el filtro
END

Options: ReplyQuote


Subject
Views
Written By
Posted
Procedimientos Almacenados
6634
August 20, 2006 09:35AM
2572
October 12, 2006 09:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.