MySQL Forums
Forum List  »  Spanish

Re: Error al crear procedimiento almacenado en MYSQL
Posted by: JOSE JOAQUIN
Date: January 24, 2008 03:26PM

HOLA,

HOLA EL PROCEDIMIENTO ALMACENADO ESTA BIEN HASTA AQUI:
create procedure elimina_repetidos ()
begin

drop table repetidos;

PERO LA SENTENCIA:
create table repetidos select email,count(*) as cantidad from email group by email having count(*) >1;

DEBE SER ALGO ASI:

CREATE TABLE repetidos(
campo1 int(10) not null primary key auto_incremet,
campo2 varchar(50) not null);

esto seria una sentencia vĂ¡lida.

luego si puede poner esto:
select email,count(*) as cantidad from email group by email having count(*) >1;

saludos..

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Error al crear procedimiento almacenado en MYSQL
2411
January 24, 2008 03:26PM


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.